/* ==========================================================================
   KAPVO brendi — "biznesingiz uchun aqlli yechim". app.css va design2.css ustidan yuklanadi.
   Ranglar (texnik topshiriq): to'q ko'k #06265B, asosiy ko'k #0866D9, yorqin ko'k #168BEA,
   oltin #FFB51B (faqat urg'u), oq #FFFFFF, yordamchi kulrang #8993A5.
   Kompyuter: to'q ko'k yon menyu, faol band — yorqin ko'k kapsula; oq kartalar.
   Telefon: oq kontent, pastda kapsula panel (faol — ko'k), ko'k "Umumiy daromad" kartasi.
   ========================================================================== */

:root {
  --k-navy: #06265B; --k-blue: #0866D9; --k-bright: #168BEA; --k-gold: #FFB51B; --k-grey: #8993A5;
  --accent: #0866D9; --brand: #0866D9; --brand-2: #06265B; --brand-hi: #168BEA; --gold: #FFB51B; --blue: #0866D9;
  --bg: #F3F6FB; --bg-3: #EEF2F8;
  --label: #0B1B36; --label-2: rgba(16,32,62,.72); --label-3: rgba(16,32,62,.48);
  --sep: rgba(16,40,90,.12);
  --frame-1: #0A4AA8; --frame-2: #072F78; --frame-3: #051E4D;
  --shadow-1: 0 1px 2px rgba(10,30,70,.05), 0 1px 1px rgba(10,30,70,.03);
  --shadow-2: 0 6px 20px -6px rgba(10,40,100,.14), 0 1px 3px rgba(10,30,70,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #3D8EF0; --brand: #3D8EF0; --blue: #3D8EF0;
    --bg: #070D1A; --bg-2: #0F182B; --bg-3: #16223A; --bg-elev: #111B30;
    --label: #FFFFFF; --label-2: rgba(226,234,250,.74); --label-3: rgba(226,234,250,.46);
    --sep: rgba(120,150,210,.18);
    --frame-1: #0A2C66; --frame-2: #071F4C; --frame-3: #041433;
    --glass: rgba(15,24,43,.78); --glass-strong: rgba(17,27,48,.9);
  }
}
:root[data-theme="dark"] {
  --accent: #3D8EF0; --brand: #3D8EF0; --blue: #3D8EF0;
  --bg: #070D1A; --bg-2: #0F182B; --bg-3: #16223A; --bg-elev: #111B30;
  --label: #FFFFFF; --label-2: rgba(226,234,250,.74); --label-3: rgba(226,234,250,.46);
  --sep: rgba(120,150,210,.18);
  --frame-1: #0A2C66; --frame-2: #071F4C; --frame-3: #041433;
  --glass: rgba(15,24,43,.78); --glass-strong: rgba(17,27,48,.9);
}

/* ---- Brend belgisi plitkasi ---- */
.brand-mark { background: linear-gradient(145deg, #0B4FB3 0%, #083A86 55%, #06265B 100%) !important;
  box-shadow: 0 6px 18px rgba(8,58,134,.32), inset 0 1px 0 rgba(255,255,255,.18) !important; }
.brand-mark svg { width: 82% !important; height: auto !important; }
.brand-name { font-weight: 800; letter-spacing: .06em; }

/* ---- Kompyuter: to'q ko'k yon menyu, faol band — ko'k kapsula (oq matn) ---- */
@media (min-width: 901px) {
  .sidebar .brand-mark { background: rgba(255,255,255,.08) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14) !important; }
  .nav-pill { background: linear-gradient(135deg, #168BEA, #0866D9) !important; box-shadow: 0 10px 24px -10px rgba(22,139,234,.7) !important; }
  .nav a.active, .nav a.active:hover { color: #fff !important; }
  .sidebar .admin-badge { color: var(--k-navy); }
  .kpi:hover { box-shadow: 0 18px 40px -22px rgba(8,50,120,.45); }
  .main { box-shadow: 0 30px 80px -30px rgba(2,12,40,.6), 0 0 0 1px rgba(255,255,255,.06); }
}
.kpi.tilt3d:hover { box-shadow: 0 26px 50px -26px rgba(8,50,120,.5); }

/* ---- Telefon: pastki kapsula panel — faol band ko'k ---- */
@media (max-width: 900px) {
  .tab-blob { background: linear-gradient(135deg, #168BEA, #0866D9 60%, #0751B0) !important; box-shadow: 0 8px 22px -8px rgba(8,102,217,.7) !important; }
  .tabbar { box-shadow: 0 14px 36px -14px rgba(6,38,91,.4), 0 0 0 .5px var(--sep) !important; }
}

/* ---- Kirish sahifasi: to'q ko'k qahramon panel ---- */
.auth-hero { background: radial-gradient(120% 90% at 0% 0%, #0B4FB3 0%, #07307A 50%, #041A42 100%) !important; }
.hero-feat svg { color: var(--k-gold) !important; }
.auth-hero .brand-name, .auth-hero .kapvo-word { color: #fff; }

/* ---- Tugmalar va urg'ular ---- */
.btn.sp, .btn.primary { background: linear-gradient(135deg, #168BEA, #0866D9) ; }
.gold-accent { color: var(--k-gold); }
::selection { background: rgba(22,139,234,.28); }

/* ---- KAPVO yozuvi (vektor) ---- */
.kapvo-word { display: inline-block; height: 1em; width: auto; vertical-align: -0.12em; }
.kapvo-word .w { fill: currentColor; }

/* ---- Davr tanlash (1C uslubida) ---- */
.period-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--sep); border-radius: 12px;
  background: var(--bg-2); color: var(--label); font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-1); }
.period-btn svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.period-btn .chev { width: 11px; height: 8px; color: var(--label-3); }
.period-btn:active { transform: scale(.97); }
.period-pick { display: flex; flex-direction: column; gap: 12px; }
.period-inputs { display: flex; align-items: center; gap: 8px; }
.period-in { width: 128px !important; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .02em; }
.period-in.bad { border-color: var(--red) !important; }
.period-sum { font-size: 13px; color: var(--label-2); margin-top: -4px; }
.period-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.period-chips .chip { border: 0; border-radius: 999px; padding: 7px 12px; background: var(--fill-3); color: var(--label); font-size: 13.5px; font-weight: 500; }
.period-chips .chip.on { background: var(--accent); color: #fff; }
.period-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.period-yrow { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 14px; }
.period-year > b { display: block; text-align: center; font-size: 16px; margin-bottom: 8px; }
.period-mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pm, .pd { border: 1px solid var(--sep); border-radius: 8px; background: var(--bg-2); color: var(--label); font-size: 14px; min-height: 40px; padding: 0; }
.pm.now, .pd.now { border-color: var(--accent); }
.pm.in, .pd.in { background: #FFE6A8; border-color: #FFD36B; color: #2B2100; }
.pm.edge, .pd.edge { background: var(--k-gold); border-color: #E9A000; color: #1D1600; font-weight: 700; }
.period-dgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.period-dgrid .wd { text-align: center; font-size: 12px; color: var(--label-3); padding: 2px 0; }
.pd { min-height: 38px; }
@media (max-width: 600px) { .period-in { width: 112px !important; } }

/* ---- Ikonkalar: o'lchami berilmagan joyda ham ulkan bo'lib ketmasin (kassadagi savat, admin qalqoni xatosi) ---- */
:where(svg[viewBox="0 0 24 24"]) { width: 1.25em; height: 1.25em; }
.pos-fab svg { width: 24px; height: 24px; flex: none; }
h1 > svg, h2 > svg, h3 > svg { width: 1em; height: 1em; vertical-align: -0.12em; margin-right: 6px; color: var(--accent); }

/* ---- Bosh sahifa (telefon, KAPVO namunasi): ko'k "Umumiy daromad" kartasi, 4 ta plitka ---- */
.k-hero { position: relative; overflow: hidden; align-items: flex-end; gap: 10px; margin-bottom: 14px; padding: 18px 18px 16px; border-radius: 22px; color: #fff; cursor: pointer;
  background: radial-gradient(120% 140% at 100% 0%, #2E9BFF 0%, transparent 55%), linear-gradient(135deg, #168BEA 0%, #0866D9 45%, #06265B 100%);
  box-shadow: 0 18px 40px -18px rgba(8,102,217,.75); }
.k-hero-l { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.k-hero-t { font-size: 13px; opacity: .9; font-weight: 600; }
.k-hero-v { font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.k-hero-s { font-size: 12.5px; opacity: .85; }
.k-hero-spark { width: 38%; max-width: 150px; height: 54px; opacity: .95; }
.k-hero-spark svg { width: 100%; height: 100%; }
.k-tiles { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.k-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border: 0; border-radius: 18px; background: var(--bg-2);
  box-shadow: var(--shadow-1); font-size: 12.5px; font-weight: 600; color: var(--label); }
.k-tile:active { transform: scale(.96); }
.k-tile-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c)); box-shadow: 0 8px 18px -10px var(--c); }
.k-tile-ic svg { width: 22px; height: 22px; }
.k-sec-title { align-items: center; justify-content: space-between; margin: 4px 2px 10px; font-size: 17px; }
.k-sec-title .more { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
@media (max-width: 900px) {
  .k-hero.mobile-only { display: flex !important; }
  .k-tiles.mobile-only { display: grid !important; }
  .k-sec-title.mobile-only { display: flex !important; }
}

/* ---- 1C uslubidagi zich jurnal jadvali ---- */
.tbl.dense { font-size: 13.5px; }
.tbl.dense th { position: sticky; top: 0; z-index: 1; background: var(--bg-3); font-size: 12px; text-transform: none; letter-spacing: 0; padding: 7px 10px; white-space: nowrap; }
.tbl.dense td { padding: 6px 10px; white-space: nowrap; }
.tbl.dense tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--accent) 3%, transparent); }
.tbl.dense tbody tr.click:hover td { background: #FFF4D6; }
.tbl.dense tfoot td { font-weight: 700; background: var(--bg-3); padding: 8px 10px; }
.tbl.dense tr.sum td { background: var(--bg-3); }
.tbl.dense tr.total td { background: color-mix(in srgb, var(--k-gold) 22%, transparent); }
.tbl-wrap:has(.tbl.dense) { overflow-x: auto; }
.sverka-note { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-weight: 700; }
.sverka-note.warn { background: color-mix(in srgb, var(--orange) 14%, transparent); color: #9A5200; }
.sverka-note.ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: #1E7A35; }

/* ---- Tahlil (BI Analytics) ---- */
.an-hub { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (max-width: 640px) { .an-hub { grid-template-columns: minmax(0,1fr); } }
.an-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--sep); border-radius: 18px; background: var(--bg-2);
  text-align: left; color: var(--label); box-shadow: var(--shadow-1); transition: transform .15s, box-shadow .2s; }
.an-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.an-card:active { transform: scale(.98); }
.an-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 75%, #fff), var(--c)); }
.an-ic svg { width: 24px; height: 24px; }
.an-t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.an-t b { font-size: 16.5px; }
.an-t small { color: var(--label-2); font-size: 13px; }
.an-go { width: 18px; height: 18px; color: var(--label-3); }
.an-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px; border-radius: 16px; background: var(--bg-2); box-shadow: var(--shadow-1); }
.an-sel { width: auto !important; min-height: 36px !important; padding-top: 5px !important; padding-bottom: 5px !important; font-size: 14px !important; max-width: 220px; }

/* ---- Kategoriya rasmlari (kolleksiya) ---- */
.cat-thumb { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; margin-right: 10px; }
.cat-thumb.ph { display: grid; place-items: center; background: var(--fill-3); color: var(--label-3); }
.cat-thumb.ph svg { width: 18px; height: 18px; }
.cat-pic img, .cat-pic-ph { width: 160px; height: 160px; border-radius: 18px; object-fit: cover; display: block; }
.cat-pic-ph { display: grid; place-items: center; align-content: center; gap: 6px; background: var(--fill-3); color: var(--label-3); font-size: 13px; }
.cat-pic-ph svg { width: 34px; height: 34px; }
.cat-tiles { display: flex !important; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.cat-tile { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--label); font-size: 12.5px; font-weight: 600; }
.cat-tile img, .cat-tile-ph { width: 92px; height: 92px; border-radius: 18px; object-fit: cover; background: var(--bg-2); box-shadow: var(--shadow-1); outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.cat-tile-ph { display: grid; place-items: center; color: var(--accent); }
.cat-tile-ph svg { width: 30px; height: 30px; }
.cat-tile.on img, .cat-tile.on .cat-tile-ph { outline-color: var(--accent); }
.cat-tile span:last-child { max-width: 92px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-tile.on span:last-child { color: var(--accent); }

/* ---- Do'konni tanlash va do'kon paroli ---- */
.shops { max-width: 520px; margin: 0 auto; padding: calc(28px + var(--safe-t)) 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.shops-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.shops-word { font-size: 26px; color: var(--k-navy); line-height: 1; }
[data-theme="dark"] .shops-word { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shops-word { color: #fff; } }
.shops-list { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-2); }
.shop-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-bottom: .5px solid var(--sep); background: none; text-align: left; color: var(--label); }
.shop-row:last-child { border-bottom: 0; }
.shop-row:active { background: var(--fill-4); }
.shop-row.cur { background: color-mix(in srgb, var(--k-gold) 14%, transparent); }
.shop-row .sp { display: flex; flex-direction: column; min-width: 0; }
.shop-row b { font-size: 16px; } .shop-row small { color: var(--label-2); font-size: 13px; }
.shop-lock svg { width: 18px; height: 18px; color: var(--k-gold); }
.shop-row .chev { width: 16px; height: 16px; color: var(--label-3); }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 8px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); }
.pin-dots i.on { background: var(--accent); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; justify-content: center; }
.pin-key { height: 64px; border-radius: 50%; border: 0; background: var(--fill-3); font-size: 24px; font-weight: 600; color: var(--label); }
.pin-key:active { background: var(--fill); }
.pin-key.ghost { background: none; pointer-events: none; }
@media (min-width: 901px) { .shops { margin-top: 6vh; padding: 28px 24px 24px; border-radius: 28px; background: var(--bg); box-shadow: 0 30px 80px -30px rgba(2,12,40,.6); } }

/* ---- Orqa fon va shaxsiy brend rasmi ---- */
@media (max-width: 900px) { body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--app-frame, none); opacity: .10; } }
html[data-bg="image"] body::before { opacity: .22; }
@media (min-width: 901px) { html[data-bg="image"] body::before { opacity: 1; } }
.brand-logo { border-radius: 11px; object-fit: cover; flex: none; background: #fff; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.bg-sw { display: flex; flex-direction: column; gap: 6px; align-items: center; border: 0; background: none; padding: 0; font-size: 12.5px; font-weight: 600; color: var(--label); }
.bg-sw i { width: 100%; aspect-ratio: 4/3; border-radius: 14px; box-shadow: var(--shadow-1); outline: 2px solid transparent; outline-offset: 2px; background-size: cover; background-position: center; }
.bg-sw.on i { outline-color: var(--accent); }
.bg-sw.on { color: var(--accent); }

/* ---- Bosh sahifa: pastel ko'rsatkich kartalari va 6 ta bo'lim plitkasi (Ural akaning ko'k versiyasi kabi) ---- */
.g-kpi .kpi { background: color-mix(in srgb, var(--kc, var(--accent)) 9%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--kc, var(--accent)) 16%, transparent); }
.k-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 4px; }
@media (min-width: 901px) { .k-sections { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.k-section { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 96px; padding: 12px; border: 1px solid color-mix(in srgb, var(--c) 18%, transparent);
  border-radius: 16px; background: color-mix(in srgb, var(--c) 10%, var(--bg-2)); color: var(--label); font-size: 13.5px; font-weight: 700; text-align: left; line-height: 1.25; }
.k-section:active { transform: scale(.97); }
.k-section .k-tile-ic { width: 38px; height: 38px; border-radius: 12px; }
.k-section .k-tile-ic svg { width: 20px; height: 20px; }

/* ---- Bloknot ---- */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.note-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 120px; padding: 14px; border: 1px solid var(--sep); border-radius: 16px;
  background: var(--bg-2); color: var(--label); text-align: left; box-shadow: var(--shadow-1); }
.note-card b { font-size: 15.5px; }
.note-card p { margin: 0; font-size: 14px; color: var(--label-2); white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; }
.note-card small { margin-top: auto; color: var(--label-3); font-size: 12px; }
.note-pin { position: absolute; top: 10px; right: 10px; color: var(--k-gold); } .note-pin svg { width: 16px; height: 16px; }
.c-yellow { background: #FFF6D6 !important; } .c-blue { background: #E3F0FF !important; } .c-green { background: #E2F7EA !important; }
.c-pink { background: #FFE6EE !important; } .c-purple { background: #EFE7FF !important; } .c-orange { background: #FFEBD9 !important; }
[data-theme="dark"] .note-card[class*=" c-"] { color: #10203A; } [data-theme="dark"] .note-card[class*=" c-"] p { color: #2A3B57; }
.note-title { font-size: 18px !important; font-weight: 700; }
.note-body { min-height: 260px; font-size: 15.5px; line-height: 1.5; }
.note-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.note-dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--sep); background: var(--bg-2); }
.note-dot.on { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Toifa rasmlari ---- */
.cat-art { display: block; width: 100%; height: 100%; }
.pcard .p-art, .pcard .p-img { display: block; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; object-fit: cover; flex: none; }
.row-art { display: block; width: 38px; height: 38px; border-radius: 10px; overflow: hidden; flex: none; }
.cat-tile-ph .cat-art { width: 92px; height: 92px; }

/* ---- Telefon — skaner ---- */
.pscan { max-width: 520px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.pscan-head { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.pscan-head svg { width: 30px; height: 30px; grid-row: span 2; color: var(--accent); }
.pscan-head small { color: var(--label-2); }
.pscan-frame { position: relative; border-radius: 20px; overflow: hidden; background: #000; aspect-ratio: 3/4; }
.pscan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pscan-frame i { position: absolute; inset: 30% 10%; border: 3px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 0 0 2000px rgba(0,0,0,.28); }
.pscan-log { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pscan-row { padding: 8px 12px; border-radius: 12px; background: var(--bg-2); box-shadow: var(--shadow-1); }
.pscan-row small { color: var(--label-3); }

/* ==================== Kassa 2.0 — Ural akaning «KAPVO mobil ilova» namunasi (18.11) ==================== */
.k-pos { --kp-line: #C9D6F0; --kp-soft: #E5EEFF; --kp-dash: #9CB0DA; --kp-ink: #0A1F4F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .k-pos { --kp-line: rgba(255,255,255,.14); --kp-soft: rgba(61,142,240,.16); --kp-dash: rgba(255,255,255,.28); --kp-ink: #fff; } }
:root[data-theme="dark"] .k-pos { --kp-line: rgba(255,255,255,.14); --kp-soft: rgba(61,142,240,.16); --kp-dash: rgba(255,255,255,.28); --kp-ink: #fff; }
.k-pos .pos-left { padding: 0 18px 0 28px; }
.kp-hd { display: flex; align-items: center; gap: 10px; margin: 0 -18px 0 -28px; padding: calc(14px + var(--safe-t, 0px)) 18px 14px 28px; background: var(--k-navy); color: #fff; }
.kp-hd h1 { margin: 0; flex: none; font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.kp-pills { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.kp-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 0; background: rgba(255,255,255,.13); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; flex: none; }
.kp-pill svg { width: 14px; height: 14px; }
.kp-pill.sync { background: rgba(255,181,27,.22); color: #FFD27A; }
.kp-ib { position: relative; flex: none; width: 42px; height: 42px; border-radius: 12px; border: 0; background: rgba(255,255,255,.13); color: #fff; display: grid; place-items: center; }
.kp-ib svg { width: 20px; height: 20px; }
.kp-ib:hover, .kp-pill:hover { background: rgba(255,255,255,.22); }
.kp-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--k-gold); color: #1D1600; font-size: 11px; font-weight: 800; line-height: 18px; font-style: normal; text-align: center; }
.kp-top { display: flex; gap: 8px; margin: 14px 0 10px; }
.kp-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--kp-line); background: var(--bg-2); cursor: text; transition: border-color .15s, box-shadow .15s; }
.kp-search svg { width: 18px; height: 18px; flex: none; color: var(--label-3); }
.kp-search:focus-within { border-color: var(--k-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k-blue) 18%, transparent); }
.kp-search-in { flex: 1; min-width: 0; height: 46px; border: 0; outline: none; background: transparent; color: var(--label); font-size: 16px; }
.kp-scan, .kp-ib2 { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; }
.kp-scan { border: 0; background: var(--k-blue); color: #fff; box-shadow: 0 8px 18px -10px var(--k-blue); }
.kp-ib2 { border: 1px solid var(--kp-line); background: var(--bg-2); color: var(--k-blue); }
.kp-scan svg, .kp-ib2 svg { width: 22px; height: 22px; }
.kp-cats { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.kp-cats::-webkit-scrollbar, .kp-pills::-webkit-scrollbar { display: none; }
.kp-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; border: 1px solid var(--kp-line); background: var(--bg-2); color: var(--label); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.kp-chip img, .kp-chip-ic { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; overflow: hidden; display: grid; place-items: center; background: var(--kp-soft); color: var(--k-blue); flex: none; }
.kp-chip-ic svg { width: 16px; height: 16px; }
.kp-chip-ic .cat-art { width: 30px; height: 30px; }
.kp-chip.on { background: var(--k-navy); border-color: var(--k-navy); color: #fff; }
.k-pos .pos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.k-pos .pcard { gap: 3px; padding: 10px; min-height: 0; border-radius: 14px; border: 1px solid transparent; box-shadow: 0 1px 3px rgba(10,31,79,.08); transition: border-color .15s; }
.k-pos .pcard:hover { border-color: var(--kp-line); }
.k-pos .pcard .p-art, .k-pos .pcard .p-img { display: grid; place-items: center; width: 100%; height: 68px; margin-bottom: 5px; border-radius: 10px; background: var(--kp-soft); object-fit: cover; overflow: hidden; }
.k-pos .pcard .p-art .cat-art { width: 68px; height: 68px; }
.k-pos .pcard .p-name { font-size: 13px; font-weight: 600; min-height: 2.5em; }
.k-pos .pcard .p-price { margin-top: auto; font-size: 15px; font-weight: 800; color: var(--k-blue); }
.k-pos .pcard .p-stock { top: 8px; right: 8px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #138A3E; background: color-mix(in srgb, #30D158 18%, var(--bg-2)); }
.k-pos .pcard .p-stock.low { color: #B86E00; background: color-mix(in srgb, var(--k-gold) 26%, var(--bg-2)); }
.k-pos .pcard .p-stock.out { color: #D70015; background: color-mix(in srgb, #FF3B30 14%, var(--bg-2)); }
.k-pos .pcard.out { opacity: .62; }
.k-pos .pcard.out .p-price { color: var(--label-2); }
.k-pos .pos-right { gap: 10px; padding: 16px 16px calc(14px + var(--safe-b)); background: var(--bg-2); border-left: 1px solid var(--kp-line); }
.kp-cart-h { display: flex; align-items: center; justify-content: space-between; }
.kp-cart-t { font-size: 17px; font-weight: 800; color: var(--label); }
.kp-link { border: 0; background: none; padding: 4px 2px; color: #FF3B30; font-size: 13.5px; font-weight: 600; }
.k-pos .kp-lines { margin: 0 -16px; padding: 0 16px; border-top: 1px solid var(--kp-line); }
.k-pos .cart-item { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "n q t" "s q t"; gap: 2px 10px; padding: 10px 0; background: transparent; border-bottom: 1px solid var(--kp-line); }
.k-pos .cart-item .ci-name { grid-area: n; }
.k-pos .cart-item .ci-sub { grid-area: s; }
.k-pos .cart-item .qty-ctl { grid-area: q; align-self: center; }
.k-pos .cart-item .ci-total { grid-area: t; align-self: center; min-width: 82px; }
.k-pos .cart-item.sel { background: transparent; }
.k-pos .cart-item.sel .ci-name { color: var(--k-blue); }
.k-pos .qty-ctl { gap: 6px; padding: 0; background: none; }
.k-pos .qty-ctl button { width: 30px; height: 30px; border-radius: 8px; background: var(--kp-soft); color: var(--kp-ink); }
.k-pos .qty-ctl input { width: 38px; font-weight: 700; }
.kp-row2 { display: flex; gap: 8px; }
.kp-dash { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-radius: 10px; border: 1px dashed var(--kp-dash); background: transparent; color: var(--label); font-size: 13px; font-weight: 600; }
.kp-dash svg { width: 16px; height: 16px; flex: none; color: var(--k-blue); }
.kp-dash.set { border-style: solid; border-color: var(--k-blue); background: color-mix(in srgb, var(--k-blue) 8%, transparent); }
.kp-sum { display: grid; gap: 3px; }
.kp-sum .ln { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--label-2); }
.kp-sum .ln b { color: var(--label); }
.kp-sum .tot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.kp-sum .tot span { flex: none; font-weight: 700; }
.kp-sum .tot b { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-align: right; font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kp-pay { display: flex; gap: 8px; }
.kp-pay button { flex: 1; padding: 11px 0; border-radius: 10px; border: 1px solid var(--kp-line); background: var(--bg-2); color: var(--label); font-size: 13.5px; font-weight: 700; }
.kp-pay button.on { background: var(--k-navy); border-color: var(--k-navy); color: #fff; }
.kp-paybtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--k-gold); color: #241800; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: 0 12px 26px -14px rgba(255,181,27,.95); }
.kp-paybtn span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-paybtn:disabled { opacity: .45; box-shadow: none; }
.kp-paybtn .kbd { background: rgba(0,0,0,.12); color: #241800; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kp-pay button.on, :root:not([data-theme="light"]) .kp-chip.on { background: var(--accent); border-color: var(--accent); } }
:root[data-theme="dark"] .kp-pay button.on, :root[data-theme="dark"] .kp-chip.on { background: var(--accent); border-color: var(--accent); }
@media (max-width: 900px) {
  .k-pos .pos-left { padding: 0 16px; }
  .kp-hd { margin: 0 -16px; padding: calc(12px + var(--safe-t, 0px)) 16px 12px; gap: 8px; }
  .kp-hd h1 { font-size: 18px; }
  .kp-ib { width: 40px; height: 40px; }
  .k-pos .pos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-bottom: 170px; }
  .k-pos .pcard { padding: 8px; border-radius: 12px; }
  .k-pos .pcard .p-art, .k-pos .pcard .p-img { height: 52px; }
  .k-pos .pcard .p-art .cat-art { width: 52px; height: 52px; }
  .k-pos .pcard .p-name { font-size: 12px; }
  .k-pos .pcard .p-price { font-size: 13.5px; }
  .k-pos .pcard .p-stock { top: 5px; right: 5px; padding: 1px 6px; font-size: 10px; }
  .pos-fab.kp-fab { gap: 8px; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .kp-fab-cart { position: relative; flex: none; width: 60px; min-height: 56px; border: 0; border-radius: 14px; background: var(--k-navy); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 26px -14px rgba(6,38,91,.9); }
  .kp-fab-cart svg { width: 24px; height: 24px; }
  .kp-fab-cart b { position: absolute; top: 5px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--k-gold); color: #1D1600; font-size: 11px; line-height: 18px; }
  .kp-fab .kp-paybtn { flex: 1; }
}
.k-pos .kp-lines { min-height: 0; }
.k-pos .kp-lines .empty { padding: 28px 12px !important; }
.k-pos .kp-lines .empty .e-ic { width: 56px; height: 56px; }
.k-pos .pos-right > * { flex-shrink: 0; }
.k-pos .pos-right > .kp-lines { flex: 1 1 auto; }

/* ---- Kassa 2.1: barmoq uchun o'lchamlar (≥44px), yagona oraliq ritmi 8/12/16, boyroq ranglar, bosish va qo'shish animatsiyalari ---- */
.k-pos { --kp-bg: #F3F6FC; --kp-card: #fff; --kp-card-line: #E3EAF7; --kp-price: #0866D9; --kp-press: cubic-bezier(.2,.8,.2,1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .k-pos { --kp-bg: transparent; --kp-card: var(--bg-2); --kp-card-line: rgba(255,255,255,.08); --kp-price: #5AA6FF; } }
:root[data-theme="dark"] .k-pos { --kp-bg: transparent; --kp-card: var(--bg-2); --kp-card-line: rgba(255,255,255,.08); --kp-price: #5AA6FF; }
.k-pos .pos-left { background: var(--kp-bg); }
.kp-hd { gap: 12px; background: linear-gradient(120deg, #06265B 0%, #0A3A85 70%, #0E4BA6 100%); box-shadow: 0 6px 18px -12px rgba(6,38,91,.8); }
.kp-pill { min-height: 32px; padding: 6px 12px; }
.kp-ib { width: 44px; height: 44px; transition: background .18s, transform .12s var(--kp-press); }
.kp-ib:active, .kp-pill:active { transform: scale(.92); }
.kp-top { gap: 10px; margin: 16px 0 12px; }
.kp-scan, .kp-ib2 { width: 50px; height: 50px; transition: transform .12s var(--kp-press), filter .15s; }
.kp-search { min-height: 50px; border-radius: 14px; background: var(--kp-card); }
.kp-scan { border-radius: 14px; background: linear-gradient(145deg, #168BEA, #0866D9); }
.kp-ib2 { border-radius: 14px; background: var(--kp-card); }
.kp-scan:active, .kp-ib2:active { transform: scale(.92); }
.kp-scan:hover { filter: brightness(1.08); }
.kp-cats { gap: 10px; padding-bottom: 14px; }
.kp-chip { min-height: 40px; background: var(--kp-card); transition: background .18s, color .18s, border-color .18s, transform .12s var(--kp-press); }
.kp-chip:active { transform: scale(.95); }
.k-pos .pos-grid { gap: 12px; }
.k-pos .pcard { padding: 10px 10px 12px; background: var(--kp-card); border-color: var(--kp-card-line); box-shadow: 0 1px 2px rgba(10,31,79,.04), 0 6px 16px -10px rgba(10,31,79,.18); transition: transform .14s var(--kp-press), box-shadow .18s, border-color .18s; }
.k-pos .pcard:hover { border-color: #BFD3F5; box-shadow: 0 1px 2px rgba(10,31,79,.05), 0 12px 24px -14px rgba(8,102,217,.45); }
.k-pos .pcard:active { transform: scale(.96); }
.k-pos .pcard .p-price { color: var(--kp-price); }
.k-pos .pcard.added { animation: kp-added .5s var(--kp-press); }
@keyframes kp-added { 0% { box-shadow: 0 0 0 0 rgba(255,181,27,.75); } 100% { box-shadow: 0 0 0 12px rgba(255,181,27,0); } }
.k-pos .pos-right { gap: 12px; padding: 16px; }
.k-pos .cart-item { gap: 4px 12px; padding: 12px 0; }
@keyframes kp-in { from { opacity: 0; transform: translateX(10px); } }
.k-pos .qty-ctl { gap: 8px; }
.k-pos .qty-ctl button { width: 36px; height: 36px; border-radius: 10px; transition: transform .1s var(--kp-press), background .15s; }
.k-pos .qty-ctl button:active { transform: scale(.88); background: color-mix(in srgb, var(--k-blue) 22%, var(--kp-soft)); }
.k-pos .qty-ctl input { width: 34px; font-size: 16px; }
.kp-row2 { gap: 10px; }
.kp-dash { min-height: 46px; border-radius: 12px; transition: background .15s, border-color .15s, transform .12s var(--kp-press); }
.kp-dash:active { transform: scale(.97); }
.kp-pay { gap: 8px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--k-blue) 7%, var(--bg-2)); }
.kp-pay button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--label-2); transition: background .2s var(--kp-press), color .2s, box-shadow .2s; }
.kp-pay button.on { background: var(--k-navy); color: #fff; box-shadow: 0 6px 14px -8px rgba(6,38,91,.9); }
.kp-paybtn { min-height: 58px; border-radius: 16px; background: linear-gradient(180deg, #FFC743 0%, #FFB51B 100%); transition: transform .12s var(--kp-press), box-shadow .2s, filter .15s; }
.kp-paybtn:not(:disabled):hover { filter: brightness(1.04); }
.kp-paybtn:not(:disabled):active { transform: scale(.97); box-shadow: 0 6px 14px -10px rgba(255,181,27,.95); }
@media (pointer: coarse) { .kp-paybtn .kbd { display: none; } }
@media (max-width: 900px) {
  .kp-hd { gap: 10px; }
  .kp-ib { width: 44px; height: 44px; }
  .k-pos .pos-grid { gap: 10px; }
  .kp-fab-cart { width: 62px; min-height: 58px; border-radius: 16px; transition: transform .12s var(--kp-press); }
  .kp-fab-cart:active { transform: scale(.94); }
  .kp-fab { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .k-pos *, .kp-fab * { animation: none !important; transition: none !important; } }

/* ==================== Bayram mavzusi (core/season.js) ==================== */
.season-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; transition: opacity .4s; }
/* Yangi yil: bosh sahifa kartasida rangli chiroqlar gulchambari (miltillaydi) */
html[data-season="newyear"] .k-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; pointer-events: none;
  background: radial-gradient(circle at 8px 9px, #FF5A5F 0 3.5px, transparent 4.5px) 0 0 / 64px 14px repeat-x,
              radial-gradient(circle at 24px 9px, #FFD36B 0 3.5px, transparent 4.5px) 0 0 / 64px 14px repeat-x,
              radial-gradient(circle at 40px 9px, #7CF29B 0 3.5px, transparent 4.5px) 0 0 / 64px 14px repeat-x,
              radial-gradient(circle at 56px 9px, #9AD0FF 0 3.5px, transparent 4.5px) 0 0 / 64px 14px repeat-x;
  filter: drop-shadow(0 0 4px rgba(255,255,255,.75)); animation: ny-blink 1.6s ease-in-out infinite alternate; }
@keyframes ny-blink { from { opacity: .55; } to { opacity: 1; } }
html[data-season="newyear"] .kp-hd { background: linear-gradient(120deg, #06265B 0%, #0A3A85 60%, #0E4BA6 100%), radial-gradient(circle, #fff 1px, transparent 1.5px) 0 0 / 22px 22px; background-blend-mode: screen; }
/* Navro'z / 8-mart: yashil-pushti iliq bezak */
html[data-season="navruz"] .k-hero, html[data-season="ayollar"] .k-hero { background: radial-gradient(120% 140% at 100% 0%, #FF9EC4 0%, transparent 45%), linear-gradient(135deg, #2BB673 0%, #0866D9 55%, #06265B 100%); }
/* Mustaqillik / Konstitutsiya: bayroq lentasi (ko'k-oq-yashil, ingichka qizil chiziqlar) */
html[data-season="mustaqillik"] .k-hero::after, html[data-season="konstitutsiya"] .k-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; pointer-events: none;
  background: linear-gradient(#1EB5E8 0 30%, #E4232E 30% 34%, #fff 34% 66%, #E4232E 66% 70%, #1EB53A 70% 100%); }
/* Hayit: tilla yulduzli tun */
html[data-season="hayit"] .k-hero { background: radial-gradient(90% 120% at 100% 0%, #FFD36B55 0%, transparent 50%), linear-gradient(135deg, #0E4BA6 0%, #06265B 70%, #041A3F 100%); }
@media (max-width: 600px) {
  .kp-hd { flex-wrap: wrap; row-gap: 10px; }
  .kp-hd h1 { flex: 1; }
  .kp-pills { order: 5; flex-basis: 100%; }
}

/* Savatga uchuvchi belgi (pos.js flyToCart) */
.kp-fly { position: fixed; z-index: 300; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; pointer-events: none; background: #fff; border: 2px solid #fff; box-shadow: 0 10px 24px -8px rgba(6,38,91,.55); will-change: transform, opacity; }
.kp-fly > * { width: 100% !important; height: 100% !important; margin: 0 !important; border-radius: 50% !important; }
.kp-fly .cat-art { width: 100%; height: 100%; }
/* Menyu pastidagi «Orqaga» */
.menu-back { display: flex; align-items: center; justify-content: center; gap: 6px; }
.menu-back svg { width: 18px; height: 18px; }

/* Telegram ichida (Android WebView) xira-oyna effekti juda og'ir — qotishlarning asosiy sababi. O'rniga to'liq fon. */
html.in-telegram *, html.in-telegram *::before, html.in-telegram *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.in-telegram .dialog, html.in-telegram .menu, html.in-telegram .sheet-foot { background: var(--bg-2); }

/* Admin: yangilik media ko'rinishi */
.news-media img, .news-media video { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 14px; background: var(--fill-4); }

/* ===== 3.10 (24.11, Ural aka) — toshish, kontrast, masofalar ===== */
/* Sahifa hech qachon yon tomonga surilmaydi (telefonda "qimirlash" yo'q). clip — scroll konteyner yaratmaydi, sticky buzilmaydi */
html, body { overflow-x: clip; max-width: 100%; }
.seg-scroll { min-width: 0; max-width: 100%; }
.row-flex > .seg-scroll, .row-flex.wrap > .seg-scroll { flex: 1 1 100%; }
.btn { max-width: 100%; min-width: 0; }
@media (max-width: 600px) { .btn { white-space: normal; line-height: 1.25; text-align: center; } }
/* Forma va uning asosiy tugmasi orasida doim havo bo'lsin (kirish: Parol ↔ Kirish yopishib qolgan edi) */
.form + .btn, .form + .btn.block, .form + .row-flex { margin-top: 20px; }
.form { row-gap: 16px; }
/* Segment (tablar) — barmoq uchun 40px */
.seg button { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.lp-hint { margin-top: 14px; line-height: 1.45; }
/* Kontrast: oq fonda och rangli matn ko'rinmaydi — matn uchun to'qroq tus (fon va belgilar o'zgarmaydi) */
:root { --orange-text: #B45309; --green-text: #15803D; --teal-text: #0E7490; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --orange-text: #FFB340; --green-text: #4ADE80; --teal-text: #5EEAD4; } }
:root[data-theme="dark"] { --orange-text: #FFB340; --green-text: #4ADE80; --teal-text: #5EEAD4; }
.warn-text { color: var(--orange-text); } .success-text { color: var(--green-text); }
.badge.green { --c: var(--green-text); } .badge.orange { --c: var(--orange-text); } .badge.teal { --c: var(--teal-text); }
.pct.num { color: var(--green-text); }
.tg-btn { --b: #1A7FC1; }
.k-pos .pcard .p-stock { color: var(--green-text); }
.seg button { color: var(--label); }
/* Oq fon ustidagi ko'k tugma matni oq bo'lib qolmasin (Telegram mavzusi / tungi rejim aralashganda) */
.btn.plain, .btn.gray, .btn.tinted { -webkit-text-fill-color: currentColor; }
input, textarea, select { -webkit-text-fill-color: currentColor; }
.page > *, .page .grid > *, .row-flex.wrap { min-width: 0; max-width: 100%; }
.row-flex.wrap > .seg-scroll { width: 100%; }
input::placeholder, textarea::placeholder { -webkit-text-fill-color: var(--label-3, #8993A5); }
