/* ═══════════════════════════════════════════════════════════
   «NEOKARTA» — ekran uslubi (egasi, 2026-09-29: «shu kabi UI ni tizimda
   saqlab qo‘yish kerak, nom berib qo‘y, boshqa bo‘limlar uchun ham shu
   tipni qo‘llaymiz»). Qoidalari — DIZAYN.md «NeoKarta», qarori — QARORLAR.md.

   To‘rt qism, har ekranda bir xil:

       .nk-hero   rangli karta — ekranning ASOSIY raqami va uning chizig‘i
       .nk-acts   uchta tugma — tez-tez qilinadigan amallar
       .nk-leg    ikonkali ro‘yxat — oxirgi harakatlar, «hammasi ›»
       .nk-dock   bitta asosiy amal — telefonda pastda qotgan

   ⛔ HAMMA SINF `nk-` PREFIKSLI va FAQAT SHU FAYLDA belgilanadi: bo‘lim
   fayli uni qayta bezamaydi, faqat o‘z joylashuvini yozadi (masalan,
   smena panelining ikki ustuni — `shift_book.css`, `sp-`). Aks holda
   bir uslub o‘nta faylga tarqalib, har bo‘limda boshqacha bo‘lib qolardi.

   ⛔ Uzun RO‘YXATLAR uchun EMAS (katalog, cheklar, mijozlar ro‘yxati) —
   u yerda jadval qoidasi (DIZAYN 5.6).
   ═══════════════════════════════════════════════════════════ */

/* ── Kartalar va matn ─────────────────────────────────────── */
.nk-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px; border-radius: 18px; background: var(--glass); box-shadow: var(--sh-2);
}
.nk-card[hidden] { display: none; }
.nk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nk-sub { font-size: var(--t-2); color: var(--muted); }
.nk-title { font-size: var(--t-5); font-weight: var(--w-bold); }
.nk-all { font-size: var(--t-2); color: var(--muted); text-decoration: none; }
.nk-mob { display: none; }

/* ── 1. Rangli karta ──────────────────────────────────────── */
/* ⛔ Rang bo‘lim ma'nosida (QARORLAR, 2026-09-29): sukut — ko‘k (kassa,
   hisobot), qarz — qizil, tovar — yashil, xarajat — binafsha, oylik — moviy */
.nk-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px;
  padding: 20px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #2f6fed 0%, #5b8df3 60%, #7ea6f7 100%);
  box-shadow: var(--sh-3);
}
.nk-hero.nk-red { background: linear-gradient(135deg, #b92f2c 0%, #dc3c39 55%, #ec6b68 100%); }
.nk-hero.nk-green { background: linear-gradient(135deg, #0c7a55 0%, #12996b 55%, #3fb489 100%); }
.nk-hero.nk-violet { background: linear-gradient(135deg, #4b3fc9 0%, #6a5cf0 55%, #8d82f5 100%); }
.nk-hero.nk-teal { background: linear-gradient(135deg, #0b6f78 0%, #0e8f8f 55%, #3db3ac 100%); }
/* Bezak doira — ma'no tashimaydi, faqat kartani «tekis varaq» qilmaydi */
.nk-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255, 255, 255, .10); pointer-events: none;
}
.nk-hero .nk-row { position: relative; z-index: 1; }
.nk-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .2); font-size: var(--t-2); font-weight: var(--w-mid); white-space: nowrap;
}
.nk-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.nk-meta { font-size: var(--t-2); color: rgba(255, 255, 255, .85); text-align: right; }
.nk-lbl { margin-top: 12px; font-size: var(--t-2); font-weight: var(--w-mid); color: rgba(255, 255, 255, .85); }
.nk-big {
  font-size: 40px; font-weight: var(--w-head); letter-spacing: -.02em; line-height: 1.2;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
/* Shkala: oq — chegaragacha, sariq — oshgani (limit, muddati o‘tgan qarz) */
.nk-gauge {
  position: relative; height: 10px; margin: 10px 0 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .25); overflow: hidden;
}
.nk-gauge i { position: absolute; top: 0; bottom: 0; left: 0; background: #fff; border-radius: 999px; }
.nk-gauge i.nk-over { background: #ffd166; border-radius: 0 999px 999px 0; }
.nk-scale { font-size: var(--t-2); color: rgba(255, 255, 255, .85); }

/* ── Ulush chizig‘i va ro‘yxat ────────────────────────────── */
/* ⛔ Chiziq ULUSH ko‘rsatadi, ro‘yxat — aniq summa: kichik bo‘lak chiziqda
   ingichka, raqami esa ro‘yxatda turadi */
.nk-bar { display: flex; gap: 2px; height: 14px; border-radius: 999px; overflow: hidden; }
.nk-bar span { display: block; min-width: 3px; }
.nk-leg { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; column-gap: 16px; align-items: center; }
.nk-key { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nk-sw { flex: none; width: 10px; height: 10px; border-radius: 3px; }
/* Kompyuterda — rangli kvadratcha, telefonda — ikonka (pastda) */
.nk-leg .nk-ico { display: none; }
.nk-amt { font-weight: var(--w-bold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nk-plus { color: var(--ok); }
.nk-minus { color: var(--danger); }

/* ── 2. Uchta tugma ───────────────────────────────────────── */
.nk-acts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.nk-act {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  min-height: var(--tap); padding: 16px; border: 0; border-radius: 16px;
  background: var(--glass); box-shadow: var(--sh-2); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.nk-act b { font-weight: var(--w-bold); }
.nk-bub { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; }
.nk-bub-lg { width: 48px; height: 48px; border-radius: 14px; }
.nk-g { background: #e3f6ee; color: var(--ok); }
.nk-r { background: #fdecec; color: var(--danger); }
.nk-b { background: var(--soft); color: var(--mid); }
.nk-y { background: #fff3e0; color: var(--warn); }
.nk-v { background: #efedff; color: #5a4de0; }

/* ── 4. Asosiy amal — faqat telefonda pastda ──────────────── */
.nk-dock { display: none; }

/* ── TELEFON — «bank ilovasi» (egasi, 2026-09-29: «2 maqul») ── */
@media (max-width: 560px) {
  .nk-card { padding: 16px; }
  .nk-big { font-size: 36px; }
  /* Tugmalar karta chetiga chiqib suzadi: karta pastdan joy beradi (`nk-lift`),
     tugmalar tepaga suriladi (`nk-float`) — ikkalasi juft yoziladi */
  .nk-hero { border-radius: 20px; }
  .nk-hero.nk-lift { padding-bottom: 64px; }
  .nk-acts { gap: 10px; }
  .nk-acts.nk-float { margin-top: -60px; position: relative; z-index: 1; }
  .nk-act { align-items: center; gap: 6px; padding: 12px 6px; text-align: center; box-shadow: var(--sh-3); }
  .nk-act .nk-sub { display: none; }
  .nk-act b { font-size: var(--t-2); }
  .nk-desk { display: none; }
  .nk-mob { display: inline; }
  .nk-leg { row-gap: 6px; }
  .nk-key { gap: 12px; }
  .nk-leg .nk-sw { display: none; }
  .nk-leg .nk-ico { display: grid; width: 36px; height: 36px; border-radius: 10px; }
  .nk-dock {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(244, 245, 247, 0), var(--page) 35%);
  }
  .nk-dock .go { margin: 0; }
}
