/* ============================================================
   XodimAI dizayn-tizimi v4.0 — «Oq + Meta ko'k» (founder tanlovi 2026-10-01:
   "Oq bilan o'sha Meta'ning ko'k rangi"). Xazina (to'q ko'k + oltin) o'rnida.
   Brend ko'k #0866FF — Meta rasmiy brend paketi (Facebook_Logo_Primary.png) dan.
   Kontrast (WCAG): #0866FF oq fonda 4.82:1 — tugma FONI (oq matn) uchun;
   matn/havola/ikonka uchun #0756D6 (oqda 6.34:1, #F0F2F5 da 5.65:1).
   Yashil/qizil — FAQAT pul semantikasi (foyda/tushum ↔ qarz/zarar).
   Bozor do'konchisi uchun: telefon, quyosh, katta barmoq. Framework'siz.
   ============================================================ */

/* ---------- Shrift: Onest (lokal, o'zbek lotin + kirill to'liq) ---------- */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url("/fonts/Onest-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url("/fonts/Onest-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url("/fonts/Onest-cyrillic-ext.woff2") format("woff2");
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

/* ---------- Token'lar ---------- */
:root {
    /* Shrift: Onest qoladi — oʻ gʻ (U+02BB) va kirill to'liq, raqamlar tabular; Meta'ning
       Optimistic shrifti yopiq litsenziyada, tizim shriftlari esa qurilmaga qarab sakraydi. */
    --shrift: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* brend: Meta ko'k */
    --asosiy: #0866FF;        /* tugma/faol fon (oq matn 4.82:1) */
    --asosiy-matn: #0756D6;   /* ko'k matn, havola, ikonka (oqda 6.34:1) */
    --asosiy-bosim: #0756D6;  /* hover */
    --asosiy-quyuq: #0648B5;  /* bosilgan */
    --asosiy-yorqin: #5B9BFF; /* ikkilamchi grafik to'ldirish */
    --asosiy-fon: #EBF3FF;    /* och ko'k: faol pill, ikonka-chip */
    --asosiy-chiziq: #B9D3FF; /* och ko'k chegara */

    /* pul semantikasi — faqat raqamlar va pul holatlari uchun */
    --musbat: #0E7A4F;
    --musbat-fon: #E3F4EC;
    --qizil: #C0262D;      /* qarz / zarar / xavf */
    --qizil-bosim: #9E1F25;
    --qizil-fon: #FCE9EA;

    /* holat ranglari */
    --sariq: #D9A400;
    --sariq-fon: #FFF4DC;
    --sariq-matn: #6B4A00;
    --kok: #8DB8FF;        /* grafik: ikkinchi ko'k seriya (karta, foyda hover) */
    --kok-fon: #EBF3FF;
    --telegram: #2AABEE;

    /* neytral shkala (Meta kulrangi) */
    --siyoh: #1C1E21;      /* asosiy matn (oqda 16.7:1) */
    --kul: #65676B;        /* ikkilamchi matn (oqda 5.67:1, #F0F2F5 da 5.05:1) */
    --kul-yengil: #8A8D91; /* uchinchi daraja: placeholder, dekor */
    --sahifa: #FFFFFF;     /* sahifa foni — oq */
    --fon: #F0F2F5;        /* ikkilamchi fon: segment, plashka, bosilgan holat */
    --oq: #FFFFFF;         /* karta foni */
    --chiziq: #DADDE1;     /* ajratuvchi chiziq, karta chegarasi */
    --chiziq-quyuq: #BEC3C9; /* input/tugma chegarasi */
    --ustun: #C9DCFF;      /* grafik ustuni (faol emas) */

    /* sidebar (desktop) — oq */
    --sidebar-fon: #FFFFFF;
    --sidebar-matn: #65676B;
    --sidebar-aktiv: #EBF3FF;

    /* shakl: bitta radius, bitta soya (Meta: yupqa chegara + yengil soya) */
    --radius: 12px;
    --radius-kichik: 8px;
    --soya: 0 1px 2px rgba(28, 30, 33, .08);
    --soya-2: 0 2px 4px rgba(28, 30, 33, .08), 0 8px 24px rgba(28, 30, 33, .10);

    /* o'lcham */
    --tugma-b: 52px;     /* asosiy tugma */
    --maydon-b: 52px;    /* input */
    --pastnav-b: 68px;   /* pastki nav */
    --sidebar-k: 244px;  /* desktop sidebar kengligi */
}


/* ---------- Ikonkalar (inline SVG, mask orqali — currentColor) ----------
   Lucide uslubidagi 24×24 chiziqli to'plam; kutubxonasiz, data-URI. */
.ic {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex: none;
    vertical-align: -4px;
    background: currentColor;
    -webkit-mask: var(--i) center / contain no-repeat;
    mask: var(--i) center / contain no-repeat;
}
.ic-home { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E"); }
.ic-cart { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E"); }
.ic-box { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.29 7 12 12 20.71 7'/%3E%3Cline x1='12' y1='22' x2='12' y2='12'/%3E%3C/svg%3E"); }
.ic-book { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E"); }
.ic-grid { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.ic-inbox { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 16 12 14 15 10 15 8 12 2 12'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E"); }
.ic-clock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E"); }
.ic-receipt { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1z'/%3E%3Cpath d='M8 7h8'/%3E%3Cpath d='M8 11h8'/%3E%3Cpath d='M8 15h5'/%3E%3C/svg%3E"); }
.ic-chart { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M18 17V9'/%3E%3Cpath d='M13 17V5'/%3E%3Cpath d='M8 17v-3'/%3E%3C/svg%3E"); }
.ic-phone { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E"); }
.ic-sliders { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7h-9'/%3E%3Cpath d='M14 17H5'/%3E%3Ccircle cx='17' cy='17' r='3'/%3E%3Ccircle cx='7' cy='7' r='3'/%3E%3C/svg%3E"); }
.ic-store { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7'/%3E%3Cpath d='M2 7h20v3a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2z'/%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'/%3E%3Cpath d='M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4'/%3E%3C/svg%3E"); }
.ic-ext { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E"); }
.ic-plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E"); }
.ic-search { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
.ic-trash { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E"); }
.ic-up { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 7 13.5 15.5 8.5 10.5 2 17'/%3E%3Cpolyline points='16 7 22 7 22 13'/%3E%3C/svg%3E"); }
.ic-down { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 17 13.5 8.5 8.5 13.5 2 7'/%3E%3Cpolyline points='16 17 22 17 22 11'/%3E%3C/svg%3E"); }
.ic-download { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E"); }
.ic-wallet { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12V7H5a2 2 0 0 1 0-4h14v4'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h16v-5'/%3E%3Cpath d='M18 12a2 2 0 0 0 0 4h4v-4z'/%3E%3C/svg%3E"); }
.ic-alert { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E"); }
.ic-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E"); }
.ic-bell { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E"); }
.ic-camera { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E"); }
.ic-pencil { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5z'/%3E%3C/svg%3E"); }
.ic-undo { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E"); }
.ic-chev { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E"); }
.ic-users { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.ic-send { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E"); }
/* katalog placeholder-ikonkalari — kategoriya bo'yicha (rasmsiz kartochka dizayni) */
.ic-drill { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E"); }
.ic-hammer { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 12-8.5 8.5a2.12 2.12 0 1 1-3-3L12 9'/%3E%3Cpath d='M17.64 15 22 10.64'/%3E%3Cpath d='m20.91 11.7-1.25-1.25c-.6-.6-.93-1.4-.93-2.25v-.86L16.01 4.6a5.56 5.56 0 0 0-3.94-1.64H9l.92.82A6.18 6.18 0 0 1 12 8.4v1.56l2 2h2.47l2.26 1.91'/%3E%3C/svg%3E"); }
.ic-disc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E"); }
.ic-lock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.ic-zap {--i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E"); }
.ic-axe { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='m4 9 2.5 4L9 9l2.5 4L14 9l2.5 4L19 9'/%3E%3Cpath d='M12 15v6'/%3E%3C/svg%3E"); }

/* ---------- Baza ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--shrift);
    -webkit-font-smoothing: antialiased;
    background: var(--sahifa);
    color: var(--siyoh);
    font-size: 16px;
    line-height: 1.45;
}
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 32px; }
/* pastki nav bo'lsa — kontent uning ostida qolmasin */
body:has(.bottomnav) main {
    padding-bottom: calc(var(--pastnav-b) + 40px + env(safe-area-inset-bottom, 0px));
}
h2, .section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 24px 0 12px;
    letter-spacing: -.01em;
}
a { color: var(--asosiy-matn); }
img { max-width: 100%; }
.muted { color: var(--kul); }
small, .small { font-size: .875rem; }

/* pul raqamlari doim tekis ustunda tursin */
.big-num, .sale-total, .stat strong, .money, table.plain td, .price, .feed-sum {
    font-variant-numeric: tabular-nums;
}

/* ---------- Ochiq demo lentasi ---------- */
.demo-lenta {
    background: var(--asosiy);
    color: #fff;
    padding: 6px 12px;
    font-size: .8125rem;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    justify-content: center;
    text-align: center;
    line-height: 1.35;
    border-bottom: none;
}
.demo-lenta a {
    color: #fff;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    font-weight: 800;
    white-space: nowrap;
}
.demo-lenta .demo-blok {
    flex-basis: 100%;
    background: var(--sariq-fon);
    color: var(--sariq-matn);
    border-radius: 10px;
    padding: 6px 10px;
    font-weight: 600;
}

/* ---------- Yuqori panel (Xazina: oq, ≤60px — logo + nom + sana) ---------- */
.topbar {
    background: var(--oq);
    color: var(--siyoh);
    border-bottom: 1px solid var(--chiziq);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 8px 8px 8px 16px;
    position: sticky;
    top: 0;
    z-index: 40;
}
.topbar .topbar-belgi { width: 40px; height: 40px; flex: none; }
.top-matn { flex: 1; min-width: 0; }
.top-matn b {
    display: block;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-matn small {
    display: block;
    font-size: .8125rem;
    color: var(--kul);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-ic {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    position: relative;
    flex: none;
    border-radius: var(--radius);
    color: var(--asosiy-matn);
}
.top-ic .ic { width: 22px; height: 22px; }
.top-ic .nuqta {
    position: absolute;
    top: 12px;
    right: 13px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--qizil);
    border: 2px solid var(--oq);
}
/* ichki sahifa: orqaga havola */
.topbar-orqaga { justify-content: space-between; padding-left: 8px; padding-right: 16px; }
.orqaga {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 48px;
    padding: 0 8px 0 4px;
    font-weight: 700;
    color: var(--asosiy-matn);
    text-decoration: none;
}
.ic-chap { transform: rotate(180deg); }
.top-dokon { color: var(--kul); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- Asosiy navigatsiya: mobilda pastki 5 band, desktopda sidebar ---------- */
.bottomnav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    display: flex;
    background: var(--oq);
    border-top: 1px solid var(--chiziq);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
/* brend bloki va bo'lim sarlavhasi — faqat desktop sidebar'da */
.bottomnav .nav-brand, .bottomnav .nav-bolim, .bottomnav .faqat-katta { display: none; }
.bottomnav .nav-links { display: grid; grid-template-columns: repeat(5, 1fr); flex: 1; }
.bottomnav a {
    position: relative;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    text-decoration: none;
    color: var(--kul);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.1;
    border-radius: var(--radius);
    -webkit-tap-highlight-color: transparent;
}
.bottomnav a .ic { width: 22px; height: 22px; }
.pn-ic { position: relative; display: grid; place-items: center; padding: 3px 16px; border-radius: 999px; }
.bottomnav a.active { color: var(--asosiy-matn); }
.bottomnav a.active .pn-ic { background: var(--asosiy-fon); }
/* faol band ustidagi ko'k chiziq */
.bottomnav a.active::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 28%;
    right: 28%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--asosiy);
}
/* buyurtmalar soni — qizil belgi (javob kutayotganlar) */
.nav-badge {
    position: absolute;
    top: -4px;
    right: 2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
    background: var(--qizil);
    color: #fff;
    box-shadow: 0 0 0 2px var(--oq);
    font-variant-numeric: tabular-nums;
}
/* ---------- Kartochka ---------- */
.card {
    background: var(--oq);
    border: 1px solid var(--chiziq);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--soya);
}

/* ---------- Tugmalar ---------- */
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 20px;
    border: 1.5px solid var(--chiziq-quyuq);
    border-radius: var(--radius);
    background: var(--oq);
    color: var(--siyoh);
    font-size: 1.0625rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s, border-color .12s, box-shadow .12s;
}
button:hover, .button:hover { border-color: var(--kul-yengil); }
button:active, .button:active { background: var(--fon); }
button.primary, .button.primary {
    width: 100%;
    min-height: var(--tugma-b);
    background: var(--asosiy);
    border-color: var(--asosiy);
    color: #fff;
    font-weight: 700;
}
button.primary:hover, .button.primary:hover { background: var(--asosiy-bosim); border-color: var(--asosiy-bosim); }
button.primary:active, .button.primary:active { background: var(--asosiy-quyuq); }
button.danger, .button.danger {
    background: var(--qizil);
    border-color: var(--qizil);
    color: #fff;
    font-weight: 700;
}
button.danger:hover { background: var(--qizil-bosim); border-color: var(--qizil-bosim); }
button.danger:active { background: var(--qizil-bosim); }
/* ro'yxat ichidagi O'chirish — past profil, ekran qizarib ketmasin */
.actions button.danger, .actions .danger {
    background: none;
    border: none;
    color: var(--qizil);
    min-height: 44px;
    padding: 10px 8px;
    font-size: .9375rem;
    font-weight: 600;
}
.actions button.danger:hover { background: var(--qizil-fon); border-radius: var(--radius-kichik); }
.actions button.danger:active { background: var(--qizil-fon); border-radius: var(--radius-kichik); }

/* katta ko'k harakat-havola: "+ Sotuv yozish" */
.primary-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tugma-b);
    background: var(--asosiy);
    border: 1.5px solid var(--asosiy);
    border-radius: var(--radius);
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    margin-bottom: 12px;
    transition: background .12s;
}
.primary-link:hover { background: var(--asosiy-bosim); }
.primary-link:active { background: var(--asosiy-quyuq); }

/* yopishqoq harakat paneli — Saqlash barmoq ostida */
.action-bar {
    position: sticky;
    bottom: calc(var(--pastnav-b) + 12px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    padding-top: 8px;
    background: linear-gradient(rgba(255, 255, 255, 0), var(--sahifa) 40%);
}
body:not(:has(.bottomnav)) .action-bar { bottom: 12px; }
.action-bar .primary { box-shadow: 0 4px 14px rgba(8, 102, 255, .28); }

/* fokus — klaviatura/kattalashtirgich uchun */
:focus-visible {
    outline: 3px solid var(--asosiy);
    outline-offset: 2px;
}

/* ---------- Sahifa sarlavhasi ---------- */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 16px;
}
.page-head h2 { margin: 0; }
.page-head .button { min-height: 44px; padding: 8px 16px; font-size: .9375rem; }

/* ---------- Formalar ---------- */
input, textarea, select {
    width: 100%;
    min-height: var(--maydon-b);
    padding: 12px 14px;
    border: 1.5px solid var(--chiziq-quyuq);
    border-radius: var(--radius-kichik);
    font-size: 1.0625rem; /* 17px — iOS zoom qilmaydi */
    font-family: inherit;
    color: var(--siyoh);
    background: var(--oq);
    margin-top: 6px;
    transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 88px; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--kul-yengil); }
input:hover, textarea:hover, select:hover { border-color: var(--kul-yengil); }
input:focus, textarea:focus, select:focus {
    border-color: var(--asosiy);
    outline: 3px solid rgba(8, 102, 255, .25);
    outline-offset: 0;
}
input.xato, select.xato { border-color: var(--qizil); }
label {
    display: block;
    margin-bottom: 16px;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--siyoh);
}
label .izoh { font-weight: 400; color: var(--kul); }
label.checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    font-weight: 500;
}
label.checkbox input {
    min-height: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    accent-color: var(--asosiy);
    flex-shrink: 0;
}
.card.form { padding: 16px; }
.card.form button[type=submit] { margin-top: 4px; }

/* To'lov turi — radio-pill kartalar */
.pay-group {
    border: none;
    border-radius: 0;
    margin: 0 0 16px;
    padding: 0;
}
.pay-group legend {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--siyoh);
    padding: 0;
    margin-bottom: 8px;
}
.pay-group label.checkbox {
    border: 1.5px solid var(--chiziq-quyuq);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 8px;
    min-height: 52px;
    background: var(--oq);
    transition: border-color .12s, background .12s;
}
.pay-group label.checkbox:hover { border-color: var(--asosiy); }
.pay-group label.checkbox:has(input:checked) {
    border-color: var(--asosiy);
    background: var(--asosiy-fon);
    font-weight: 700;
}

/* ---------- Qidiruv ---------- */
.search { display: flex; gap: 8px; margin: 0 0 16px; }
.search input { flex: 1; margin-top: 0; }
.search button { flex-shrink: 0; }

/* ochiladigan qo'shish formasi */
.add-form { margin-bottom: 16px; }
.add-form summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--asosiy-matn);
    padding: 12px 0;
    list-style-position: inside;
}
.add-form summary:hover { color: var(--asosiy-bosim); }

/* ---------- Xabarlar ---------- */
.error, .success, .warn {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-kichik);
    margin: 0 0 12px;
    font-weight: 500;
    line-height: 1.4;
}
.error::before, .success::before, .warn::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: none;
    align-self: flex-start;
    margin-top: 3px;
    background: currentColor;
    -webkit-mask: var(--i) center / contain no-repeat;
    mask: var(--i) center / contain no-repeat;
}
.error {
    background: var(--qizil-fon);
    color: var(--qizil);
    border-left: 4px solid var(--qizil);
}
.error::before { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E"); }
.success {
    background: var(--musbat-fon);
    color: var(--musbat);
    border-left: 4px solid var(--musbat);
}
.success::before { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E"); }
.warn {
    background: var(--sariq-fon);
    color: var(--sariq-matn);
    border-left: 4px solid var(--sariq);
    display: block; /* ichida havolalar bor — oqim buzilmasin */
    padding-left: 42px;
    position: relative;
}
.warn::before {
    position: absolute;
    left: 16px;
    top: 15px;
    --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E");
}

/* ---------- Pul-kartochka (tizim imzosi) ---------- */
.total-card { text-align: center; padding: 20px 16px; }
.total-card > span:not(.chip):not(.badge) { display: block; font-size: .9375rem; color: var(--kul); font-weight: 600; }
.total-card small { display: block; }
.total-card > .badge { margin: 6px 0 4px; }
.total-card > .karta-ism { display: block; font-size: 1.375rem; line-height: 1.25; }
.big-num {
    display: block;
    font-size: clamp(2rem, 8vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--musbat);
    margin: 6px 0 2px;
    line-height: 1.1;
}
.big-num .som { font-size: .5em; font-weight: 600; color: var(--kul); }
.total-card.qarz .big-num, .big-num.qarz { color: var(--qizil); }
.total-card .button { margin-top: 12px; }

/* farq ko'rsatkichi: ↑ 12% kechagidan */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .8125rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    margin-top: 8px;
}
.chip .ic { width: 14px; height: 14px; }
.chip-up { background: var(--musbat-fon); color: var(--musbat); }
.chip-down { background: var(--qizil-fon); color: var(--qizil); }
.chip-neytral { background: var(--fon); color: var(--kul); }

/* ---------- Raqam-kartochkalar to'plami ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.stat-grid .card { margin-bottom: 0; }
.stat { padding: 14px; position: relative; }
/* Faqat kartochka YORLIG'I (to'g'ridan-to'g'ri bola span). `strong` ichidagi raqam-span va
   chip'lar bu qoidadan tashqarida — raqam katta/qalin, "so'm" kichik (audit T1). */
.stat > span:not(.stat-ic):not(.chip) {
    display: block;
    color: var(--kul);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .01em;
    padding-right: 36px;
}
.stat strong {
    display: block;
    margin-top: 6px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.2;
}
.stat strong .som { font-size: .75em; font-weight: 600; color: var(--kul); }
.stat strong > span:not(.som) { white-space: nowrap; }
.stat .chip { margin-top: 6px; }
.stat > small { display: block; margin-top: 4px; }
/* burchakdagi ikonka-chip */
.stat .stat-ic {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-kichik);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--asosiy-fon);
    color: var(--asosiy-matn);
    padding: 0;
}
.stat .stat-ic .ic { width: 18px; height: 18px; }
.stat .stat-ic.qizil { background: var(--qizil-fon); color: var(--qizil); }
.stat .stat-ic.sariq { background: var(--sariq-fon); color: var(--sariq-matn); }
.stat .stat-ic.kok { background: var(--asosiy-fon); color: var(--asosiy-matn); }

/* pul ranglari */
.sale-total { color: var(--musbat); font-weight: 700; font-size: 1.125rem; }
.sale-total.paid { color: var(--kul); }
.debt-plus { color: var(--qizil); }   /* qarz berildi / xarajat */
.debt-minus, .musbat { color: var(--musbat); } /* qarz qaytdi / foyda / tushum */

/* ---------- Haftalik mini-grafik (sof CSS bar-chart) ---------- */
.chart-card { padding: 16px; }
.chart-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.chart-head span { font-size: .9375rem; font-weight: 700; }
.chart-head a { font-size: .875rem; font-weight: 600; text-decoration: none; }
.chart-head a:hover { text-decoration: underline; }
.bars { display: flex; gap: 8px; align-items: flex-end; }
.bar { flex: 1; text-align: center; min-width: 0; }
.bar .joy {
    height: 88px;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(var(--fon) 1px, transparent 1px) 0 0 / 100% 22px;
    border-radius: 4px 4px 0 0;
}
.bar .ustun {
    width: 100%;
    min-height: 3px;
    border-radius: 4px 4px 2px 2px;
    background: var(--ustun);
    transition: background .12s;
}
.bar:hover .ustun { background: var(--asosiy-yorqin); }
.bar.now .ustun { background: var(--asosiy); }
.bar .kun {
    display: block;
    margin-top: 6px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--kul);
}
.bar.now .kun { color: var(--asosiy-matn); font-weight: 700; }

/* ---------- Oxirgi sotuvlar lentasi ---------- */
.feed { padding: 4px 16px; }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--fon);
}
.feed-list li:last-child { border-bottom: none; }
.feed-ic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--asosiy-fon);
    color: var(--asosiy-matn);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.feed-ic .ic { width: 18px; height: 18px; }
.feed-info { flex: 1; min-width: 0; }
.feed-info strong { display: block; font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-info small { color: var(--kul); }
.feed-sum { font-weight: 700; color: var(--musbat); white-space: nowrap; }
.feed-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    font-weight: 700;
    font-size: .9375rem;
    text-decoration: none;
    border-top: 1px solid var(--fon);
    margin: 0 -16px;
}
.feed-more:hover { background: var(--fon); border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Davr tanlash (segment) ---------- */
.davr-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 16px;
    background: var(--fon);
    border-radius: calc(var(--radius) - 2px);
    padding: 4px;
}
.davr-tabs a {
    flex: 1;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: none;
    border-radius: calc(var(--radius) - 6px);
    background: none;
    color: var(--kul);
    font-weight: 700;
    text-decoration: none;
}
.davr-tabs a:hover { background: rgba(255, 255, 255, .6); }
.davr-tabs a.on {
    background: var(--asosiy);
    color: #fff;
    font-weight: 700;
    box-shadow: none;
}

/* ---------- Jadval (qisqa ma'lumot; raqamlar o'ngda) ---------- */
table.plain { width: 100%; border-collapse: collapse; }
table.plain th {
    text-align: left;
    color: var(--kul);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 8px 6px;
    border-bottom: 1px solid var(--chiziq);
}
table.plain td { padding: 12px 6px; border-bottom: 1px solid var(--fon); }
table.plain tr:last-child td { border-bottom: none; }
table.plain tbody tr:hover td { background: var(--fon); }
table.plain th.num, table.plain td.num { text-align: right; }
table.plain th:last-child, table.plain td:last-child { text-align: right; }
table.plain td:last-child { font-weight: 700; }

/* ---------- Mobil-ro'yxat (mahsulot, sotuv, qarz...) ---------- */
.products, .leads { list-style: none; padding: 0; margin: 0; }
.products .card, .leads .card { transition: box-shadow .12s, border-color .12s; }
.products .card:hover, .leads .card:hover { border-color: var(--chiziq-quyuq); box-shadow: var(--soya-2); }
.product { display: flex; gap: 12px; }
.product img, .product .no-image {
    width: 88px; height: 88px;
    object-fit: cover;
    border-radius: var(--radius-kichik);
    flex-shrink: 0;
    border: 1px solid var(--chiziq);
}
.product .no-image, .no-image {
    background: var(--fon);
    color: var(--kul-yengil);
    display: flex; align-items: center; justify-content: center;
    font-size: .8125rem;
    border: none;
}
.product .info { flex: 1; min-width: 0; }
.info strong { display: block; font-size: 1.0625rem; line-height: 1.3; }
.info small { display: block; margin: 3px 0; color: var(--kul); }
.info .sale-total { display: block; margin: 2px 0; }

/* qator ichidagi tez formalar */
.price-form { display: flex; gap: 8px; margin: 8px 0; }
.price-form input { max-width: 160px; margin-top: 0; min-height: 48px; }
.price-form button { flex-shrink: 0; }
.image-form { margin: 6px 0; }
.upload {
    color: var(--asosiy-matn);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}
.upload:hover { color: var(--asosiy-bosim); }
.upload input[type=file] { display: none; }
.quick-sell { margin: 8px 0 4px; }
.quick-sell .sell {
    width: 100%;
    background: var(--asosiy-fon);
    border-color: var(--asosiy);
    color: var(--asosiy-matn);
    font-weight: 700;
}
.quick-sell .sell:hover { background: #DCEAFF; }
.quick-sell .sell:active { background: #CCE0FF; }
.actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}
.actions a {
    color: var(--asosiy-matn);
    font-weight: 600;
    font-size: .9375rem;
    text-decoration: none;
    padding: 10px 8px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-kichik);
}
.actions a:hover, .actions a:active { background: var(--asosiy-fon); }

/* badge — statuslar: sariq ogohlantirish, qizil xavf, yashil ok, ko'k info */
.badge {
    display: inline-block;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: .8125rem;
    font-weight: 700;
}
.badge.out { background: var(--sariq-fon); color: var(--sariq-matn); }
.badge.xavf { background: var(--qizil-fon); color: var(--qizil); }
.badge.ok { background: var(--musbat-fon); color: var(--musbat); }
.badge.info { background: var(--asosiy-fon); color: var(--asosiy-matn); }

/* ---------- Lidlar ---------- */
.lead strong { display: block; font-size: 1.0625rem; }
.lead a { color: var(--asosiy-matn); font-weight: 700; text-decoration: none; }
.lead span { display: block; margin: 3px 0; }

/* ---------- Ikki ustun (qarzdor amallari) ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.two-col .card { margin-bottom: 0; }
@media (max-width: 520px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Ma'lumot qatorlari: yorliq chapda, qiymat o'ngda (solishtirish, nasiya) ---------- */
.qatorlar { margin: 8px 0 0; padding: 0; }
.qatorlar > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--chiziq);
}
.qatorlar > div:first-child { border-top: none; }
.qatorlar dt { color: var(--kul); font-size: .9375rem; }
.qatorlar dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.qatorlar + .chip-qator { margin-top: 8px; }
.chip-qator { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-qator .chip { margin-top: 0; }
/* kartochka boshi: holat belgisi + ism */
.karta-bosh { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.karta-bosh strong { font-size: 1.1875rem; line-height: 1.25; }
/* ---------- Panel ro'yxat-qatori: butun kartochka bosiladi, o'ngda summa/belgi/strelka ----------
   (.item-link — faqat katalog plitkasi uchun, ustun yo'nalishda) */
.card:has(> .row-link) { padding: 0; }
.row-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 14px 12px 14px 16px;
    text-decoration: none;
    color: inherit;
    border-radius: inherit;
}
.row-link:active { background: var(--fon); }
.row-link .info { flex: 1; min-width: 0; }
.row-link .info strong { overflow-wrap: anywhere; }
.row-yon {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    text-align: right;
}
.row-summa {
    font-size: 1.125rem;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.row-summa .som { font-size: .75em; font-weight: 600; color: var(--kul); }
.row-link > .ic-chev { flex-shrink: 0; color: var(--kul-yengil); }
/* lenta qatoridagi "→" havola — barmoq nishoni 44px (audit T7) */
a.feed-sum {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    text-decoration: none;
}

/* blok sarlavhasi + holat belgisi (nasiya, sozlamalar bloklari) */
.blok-bosh {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.blok-bosh h2, h2.blok-sarlavha { margin: 0; font-size: 1.125rem; }
h2.blok-sarlavha { margin-bottom: 12px; }
/* forma/blok ichidagi yordamchi izoh (label ichida ham, tashqarisida ham) */
.izoh { color: var(--kul); font-size: .875rem; font-weight: 400; line-height: 1.45; }
small.izoh { display: block; margin: 6px 0 12px; }
p.izoh { margin: 0 0 12px; }
ol.izoh { margin: 0 0 16px; padding-left: 20px; }
ol.izoh li { margin-bottom: 4px; }
details > summary + label { margin-top: 12px; }
.blok-matn { margin: 0 0 4px; }
.blok-izoh { margin: 4px 0 12px; font-size: .875rem; color: var(--kul); }
.blok-qism { margin-top: 12px; }
.blok-kichik { font-size: 1rem; margin: 20px 0 4px; }
.qatorlar dt .badge { margin-left: 6px; }
/* to'liq kenglikdagi tugma (xavfli/ikkilamchi harakatlar ham barmoq ostida) */
button.keng, .button.keng { width: 100%; }
.button.keng + .button.keng, button.keng + .button.keng { margin-top: 8px; }

/* ---------- Bo'sh holat ---------- */
.empty {
    text-align: center;
    padding: 40px 24px;
    color: var(--kul);
}
.empty .belgi {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--fon);
    color: var(--kul-yengil);
    font-size: 2rem; /* emoji fallback */
    line-height: 1;
}
.empty .belgi .ic, .belgi .ic { width: 34px; height: 34px; }
.auth-error .belgi {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--fon);
    color: var(--kul-yengil);
}
.belgi.sariq { background: var(--sariq-fon); color: var(--sariq-matn); }
.empty p { margin: 0 0 16px; font-size: 1rem; }
.empty .button { width: auto; }

/* ---------- Auth xato sahifasi ---------- */
.auth-error { text-align: center; padding-top: 15vh; }
.auth-error code {
    background: var(--oq);
    border: 1px solid var(--chiziq);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 1.0625rem;
}

/* ============================================================
   Ochiq katalog v3 — «oq cover» (Click tanqidi bo'yicha):
   90% neytral / 10% ko'k aksent; Uzum-anatomiyali kartochka;
   tiriklik-satri; yopishqoq mobil CTA. Spacing-ritm: 16/24px.
   ============================================================ */

/* --- (a) Header: do'kon cover, oq va ixcham --- */
.cover { background: var(--oq); border-bottom: 1px solid var(--chiziq); }
.cover-ich { max-width: 760px; margin: 0 auto; padding: 12px 16px 16px; }
.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.catalog-brand { display: inline-flex; text-decoration: none; }
.catalog-brand svg { width: 92px; height: 22px; display: block; }
.brand-sub { font-size: .8125rem; font-weight: 600; color: var(--kul); }

.shapka { display: flex; gap: 12px; align-items: center; }
.shapka .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--asosiy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    font-weight: 800;
    flex: none;
}
.shapka-matn { min-width: 0; }
.shapka h1 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shapka .subtitle { margin: 2px 0 0; font-size: .9375rem; font-weight: 600; color: var(--kul); }
.shapka .joylashuv { margin: 2px 0 0; font-size: .875rem; color: var(--kul); }

/* ishonch-chiplar — neytral zona (yashil EMAS) */
.ishonch-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 16px -16px 0;
    padding: 0 16px;
}
.ishonch-chips::-webkit-scrollbar { display: none; }
.i-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--fon);
    color: var(--kul);
    font-size: .8125rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.i-chip .ic { width: 14px; height: 14px; }

/* tiriklik-satri: "29 mahsulot · bugun yangilangan" */
.tiriklik { margin: 16px 0 0; font-size: .875rem; font-weight: 600; color: var(--siyoh); }

/* --- (a5/c) Qo'sh CTA: bir qatorda 50/50, bittasi bo'lsa to'liq --- */
.cta { display: flex; gap: 8px; margin: 16px 0 0; }
.cta-tugma {
    flex: 1;
    min-width: 0; /* flex-item matni qatorni kengaytirib yubormasin */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 8px;
    border-radius: var(--radius);
    color: #fff;
    text-decoration: none;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    transition: background .12s;
}
.cta-tugma.call { background: var(--asosiy); }
.cta-tugma.call:hover { background: var(--asosiy-bosim); }
.cta-tugma.call:active { background: var(--asosiy-quyuq); }
.cta-tugma.tg { background: var(--telegram); }
.cta-tugma.tg:hover { background: #1E96D6; }
.cta-tugma.tg:active { background: #1B87C2; }
/* tor ekranda (2 tugma yonma-yon) matn shkala bir pog'ona pastga — kesilmasin */
@media (max-width: 479.98px) {
    .cta-tugma { font-size: .9375rem; gap: 6px; }
}

.cover .search { margin: 16px 0 0; }

/* --- (d) Kategoriya chiplari soni bilan + o'ng chetda so'nish --- */
.chips-wrap { position: relative; margin: 16px -16px 0; }
.chips-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 4px;
    width: 24px;
    background: linear-gradient(to left, var(--oq), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.chips-wrap .kat-chips { margin-bottom: 0; padding: 0 16px 4px; }
.kat-chips .son { color: var(--kul); font-weight: 600; }
.kat-chips a.on .son { color: #fff; }

/* --- (b) Mahsulot kartochkasi: Uzum tartibida --- */
.catalog-main { padding-top: 24px; }
.catalog-grid {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
    gap: 12px;
}
.catalog-grid .item {
    background: var(--oq);
    border: 1px solid var(--chiziq);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--soya);
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.catalog-grid .item:hover {
    box-shadow: var(--soya-2);
    border-color: var(--chiziq-quyuq);
    transform: translateY(-2px);
}
/* butun kartochka bosiladi */
.item-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.catalog-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.catalog-grid .item:has(.badge.out) img { filter: grayscale(.6); opacity: .75; }
/* rasmsiz — "dizayn qilingan" placeholder: och gradient + kategoriya ikonkasi + brend */
.catalog-grid .ph {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(145deg, var(--fon), var(--oq));
}
.catalog-grid .ph .ic { width: 32px; height: 32px; color: var(--kul-yengil); }
.catalog-grid .ph-brand { font-size: .8125rem; font-weight: 700; color: var(--kul); }
.catalog-grid .body { display: block; padding: 12px; }
.catalog-grid .name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--siyoh);
    line-height: 1.35;
    min-height: 2.7em; /* doim 2 qator joy — kartochkalar bir balandlikda */
}
.catalog-grid .badge.out { margin-top: 6px; align-self: flex-start; }
/* narx — kartochkaning eng qalin elementi (pill YO'Q) */
.catalog-grid .price {
    display: block;
    margin-top: 6px;
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--siyoh);
    line-height: 1.3;
}
.catalog-grid .price .birlik { font-size: .8125rem; font-weight: 600; color: var(--kul); }

/* Kafolat/yetkazib berish matni — footer ustidagi ishonch kartasi */
.catalog-extra { margin-top: 24px; padding: 16px; }
.catalog-extra p { margin: 0; white-space: pre-line; font-size: .9375rem; line-height: 1.5; }
.catalog-footer { text-align: center; color: var(--kul); font-size: .875rem; padding: 24px 0; }
.catalog-footer .viral {
    display: block;
    margin-top: 8px;
    color: var(--asosiy-matn);
    font-weight: 600;
    text-decoration: none;
}
.catalog-footer .viral:hover { text-decoration: underline; }

/* --- (c) Yopishqoq CTA — faqat mobil --- */
.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: var(--oq);
    border-top: 1px solid var(--chiziq);
    box-shadow: 0 -1px 6px rgba(28, 30, 33, .06);
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
}
.sticky-cta .cta { margin: 0 auto; max-width: 760px; }
@media (max-width: 719.98px) {
    /* kontent va viral-footer sticky bar ostida qolmasin */
    body:has(.sticky-cta) .catalog-main {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
}
@media (min-width: 720px) {
    .sticky-cta { display: none; } /* desktopda header CTA yetadi */
}

/* ---------- "Boshqa" menyusi: 9 bo'lim, bitta kartochka ichida ---------- */
.sahifa-sarlavha { font-size: 1.375rem; font-weight: 800; margin: 4px 0 16px; }
.menyu { list-style: none; margin: 0 0 16px; padding: 4px 16px; }
.menyu li + li { border-top: 1px solid var(--chiziq); }
.menyu a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 8px 0;
    color: var(--siyoh);
    text-decoration: none;
}
.menyu a:active { background: var(--fon); }
.m-ic {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-kichik);
    display: grid;
    place-items: center;
    flex: none;
    background: var(--asosiy-fon);
    color: var(--asosiy-matn);
}
.m-ic .ic { width: 22px; height: 22px; }
.m-matn { flex: 1; min-width: 0; }
.m-matn b { display: block; font-weight: 800; font-size: 1.0625rem; line-height: 1.3; }
.m-matn small { display: block; font-size: .8125rem; color: var(--kul); }
.m-ong { color: var(--kul); width: 20px; height: 20px; flex: none; }
.m-badge { position: static; box-shadow: none; flex: none; }
.m-ok {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
    background: var(--musbat-fon);
    color: var(--musbat);
}
.m-ok .ic { width: 14px; height: 14px; }
.yordam {
    display: flex;
    gap: 14px;
    align-items: center;
    color: var(--asosiy-matn);
    text-decoration: none;
}
.yordam .ic { width: 22px; height: 22px; }
.yordam b { display: block; font-weight: 800; }
.yordam small { display: block; color: var(--kul); }

/* "Ilovani o'rnatish" (Boshqa) — .yordam/.button display'i hidden atributini bosib ketmasin */
.pwa-karta[hidden], .pwa-karta [hidden] { display: none !important; }
.pwa-karta { align-items: flex-start; }
.pwa-karta > .ic { margin-top: 2px; }
.pwa-karta .pwa-matn { flex: 1; min-width: 0; color: var(--siyoh); }
.pwa-karta .pwa-matn > b { color: var(--asosiy-matn); }
.pwa-karta .pwa-yol { margin-top: 8px; color: var(--siyoh); line-height: 1.45; }
.pwa-karta .pwa-yol b { display: inline; font-weight: 700; color: var(--siyoh); }
.pwa-karta #pwa-tugma { margin-top: 12px; }

/* ---------- Bo'lim ichidagi tablar (Mijozlar|So'rovlar, Kirim|Xarajat, Hisobot|Grafiklar) ---------- */
.bolim-tab {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0 0 16px;
    border-radius: calc(var(--radius) - 2px);
    background: var(--fon);
}
.bolim-tab a {
    flex: 1;
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0 8px;
    border-radius: calc(var(--radius) - 6px);
    color: var(--kul);
    font-weight: 700;
    font-size: .9375rem;
    text-align: center;
    text-decoration: none;
}
.bolim-tab a.on { background: var(--oq); color: var(--asosiy-matn); box-shadow: var(--soya); }
/* ============================================================
   Bugun sahifasi — «Xazina» qahramoni (A-xazina.html, 1-ekran)
   ============================================================ */
.raqam, .hr-son, .hero dd, .u-qiymat, .son-belgi, .nav-badge { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.manfiy { color: var(--qizil); }
.manfiy-matn { color: var(--qizil); font-weight: 600; }
.som { font-size: max(.5em, .875rem); font-weight: 600; letter-spacing: 0; color: var(--kul); }
main.bugun > .card, main.bugun > .hero, main.bugun > .davr { margin-bottom: 16px; }

/* davr almashtirgich: Bugun / Hafta / Oy */
.davr {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: calc(var(--radius) - 2px);
    background: var(--fon);
}
.davr a {
    min-height: 44px;
    display: grid;
    place-items: center;
    /* "Bu oy (1-oktabrdan)" telefonda 2 qatorga o'tadi — markazda, zich */
    text-align: center;
    padding: 6px 4px;
    line-height: 1.2;
    font-size: .9em;
    font-weight: 700;
    color: var(--kul);
    text-decoration: none;
    border-radius: calc(var(--radius) - 6px);
}
.davr a.faol { background: var(--asosiy); color: #fff; }

/* qahramon — oq kartochka, qora katta raqam, tepada ko'k chiziq. Ko'k gradient varianti rad
   etildi: yashil/qizil pul ranglari ko'k ustida 3.6–4.0:1 ga tushadi (meta-kok-2026-10-01/qahramon-*). */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 20px;
    color: var(--siyoh);
    background: var(--oq);
    border: 1px solid var(--chiziq);
    box-shadow: var(--soya-2);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--asosiy);
}
.hero p { margin: 0; }
.hero-yorliq { color: var(--kul); text-transform: uppercase; letter-spacing: .06em; font-size: .8125rem; font-weight: 700; }
.hero-raqam { font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0 10px !important; white-space: nowrap; }
.hr-son { font-size: clamp(2rem, 10vw, 2.5rem); color: var(--siyoh); }
.hero-raqam .som { font-size: 1.125rem; color: var(--kul); }
.osish {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 700;
    font-size: .9375rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--musbat-fon);
    color: var(--musbat);
}
.osish .ic { width: 16px; height: 16px; }
.osish.pasayish { background: var(--qizil-fon); color: var(--qizil); }
.osish-izoh { font-weight: 600; opacity: .85; }
.hero-jadval { margin: 16px 0 0; border-top: 1px solid var(--chiziq); }
.hero-jadval div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; }
.hero-jadval div + div { border-top: 1px solid var(--chiziq); }
.hero-jadval dt { font-size: .9375rem; color: var(--kul); }
.hero-jadval dd { margin: 0; font-weight: 800; font-size: 1.0625rem; white-space: nowrap; }
.hj-jami dt { font-weight: 800; color: var(--siyoh); }
.hj-jami dd { font-size: 1.25rem; }
.hero-izoh { font-size: .8125rem; margin-top: 8px !important; color: var(--kul); }
.hero-ogoh { font-size: .8125rem; margin-top: 8px !important; color: var(--sariq-matn); }
.hero-ogoh a { color: var(--asosiy-matn); font-weight: 700; }

/* bugungi savdo qatori */
.bugun-qator {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 8px;
    align-items: center;
    border-left: 4px solid var(--asosiy);
    color: var(--siyoh);
    text-decoration: none;
}
.bq-yorliq, .k-yorliq { font-weight: 700; font-size: .9375rem; color: var(--kul); display: block; }
.bugun-qator .raqam { grid-column: 1; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.bugun-qator .chip { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
.bugun-qator small { grid-column: 1 / -1; color: var(--kul); }

/* sizga qarz */
.qarz-k { display: block; border-top: 3px solid var(--qizil); color: var(--siyoh); text-decoration: none; }
.qarz-k .raqam { display: block; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; white-space: nowrap; }
.qarz-k .raqam .som { color: var(--kul); }
.qarz-k small { display: block; font-size: .875rem; color: var(--kul); }

/* bugun nima qilish kerak */
.vazifa h2, .reyting h2, .osish-karta h2 { margin: 0; font-size: 1.125rem; font-weight: 800; }
.vazifa ul, .reyting ol { list-style: none; margin: 0; padding: 0; }
.vazifa li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.vazifa li + li { border-top: 1px solid var(--chiziq); }
.v-ic {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-kichik);
    display: grid;
    place-items: center;
    flex: none;
    background: var(--asosiy-fon);
    color: var(--asosiy-matn);
}
.v-ic .ic { width: 22px; height: 22px; }
.v-qarz { background: var(--qizil-fon); color: var(--qizil); }
.v-mol { background: var(--sariq-fon); color: var(--sariq-matn); }
.v-matn { flex: 1; min-width: 0; }
.v-matn b { display: block; font-weight: 700; line-height: 1.3; }
.v-matn small { display: block; font-size: .8125rem; color: var(--kul); }
.son-belgi {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .875rem;
    background: var(--asosiy);
    color: #fff;
}
/* kichik ko'k tugma (kartochka ichidagi harakat) */
.button.tugma-kichik, button.tugma-kichik {
    flex: none;
    min-height: 44px;
    padding: 0 14px;
    font-size: .9375rem;
    font-weight: 800;
    background: var(--asosiy);
    border-color: var(--asosiy);
    color: #fff;
}
.button.tugma-kichik:hover { background: var(--asosiy-bosim); border-color: var(--asosiy-bosim); }

/* eng foydali mollar */
.reyting .blok-bosh small { color: var(--kul); }
.reyting li { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.o-son {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
    font-weight: 800;
    font-size: .875rem;
    background: var(--asosiy-fon);
    color: var(--asosiy-matn);
}
.reyting li:first-child .o-son { background: var(--asosiy); color: #fff; }
.r-ichi { flex: 1; min-width: 0; }
.r-q { display: flex; justify-content: space-between; gap: 8px; }
.r-q b:first-child { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-q .raqam { font-weight: 800; white-space: nowrap; }
.r-bar { height: 6px; border-radius: 3px; background: var(--asosiy-fon); margin: 6px 0 4px; overflow: hidden; }
.r-bar i { display: block; height: 100%; border-radius: 3px; background: var(--asosiy); }
.reyting li:first-child .r-bar i { background: var(--asosiy); }
.reyting small { display: block; font-size: .8125rem; color: var(--kul); }
.blok-havola {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 48px;
    margin: 8px -16px -16px;
    border-top: 1px solid var(--chiziq);
    font-weight: 700;
    color: var(--asosiy-matn);
    text-decoration: none;
}

/* oyma-oy sof foyda */
.ustunlar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 150px; margin: 12px 0 10px; }
.ustunlar .ustun { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; position: relative; }
.u-joy { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.u-joy i { display: block; width: 100%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--ustun); }
.ustunlar .ustun.oxirgi .u-joy { padding-top: 18px; }
.ustunlar .ustun.oxirgi .u-joy i { background: var(--asosiy); }
.ustunlar .ustun span { font-size: .8125rem; color: var(--kul); font-weight: 600; }
.u-qiymat { position: absolute; top: -4px; font-size: .75rem; font-weight: 800; white-space: nowrap; color: var(--siyoh); }
.izoh-markaz { text-align: center; }

/* ---------- Tez harakatlar (dashboard) ---------- */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.quick-links .button {
    width: 100%;
    min-height: 60px;
    padding: 12px;
    font-size: .9375rem;
    text-align: center;
    flex-direction: column;
    gap: 6px;
}
.quick-links .button .ic { color: var(--asosiy-matn); }

/* ---------- Harakat kamaytirish ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   Desktop (≥1024px): chap sidebar (oq, faol band och ko'k fonda).
   Pastki nav yon panelga aylanadi; topbar oq sarlavha bo'ladi.
   ============================================================ */
@media (min-width: 720px) {
    main { padding: 24px 24px 48px; }
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    button.primary, .button.primary { display: flex; max-width: 480px; margin-left: auto; margin-right: auto; }
    .action-bar { display: flex; justify-content: center; }
    .action-bar .primary { width: 480px; }
    .quick-links { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
    body:has(.bottomnav) { padding-left: var(--sidebar-k); }
    body:has(.bottomnav) main { max-width: 980px; padding-bottom: 48px; }

    /* pastki nav → sidebar */
    .bottomnav {
        top: 0;
        right: auto;
        bottom: 0;
        width: var(--sidebar-k);
        flex-direction: column;
        background: var(--sidebar-fon);
        border-top: none;
        border-right: 1px solid var(--chiziq);
        box-shadow: none;
        padding: 16px 12px;
        overflow-y: auto;
    }
    .bottomnav .nav-brand {
        display: block;
        padding: 6px 10px 18px;
        color: var(--siyoh);
    }
    .bottomnav .nav-brand .nav-logo {
        width: 134px;
        height: 32px;
        display: block;
        margin-bottom: 4px;
    }
    .bottomnav .nav-brand small {
        display: block;
        color: var(--sidebar-matn);
        font-size: .75rem;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .bottomnav .nav-links { display: flex; flex-direction: column; gap: 2px; }
    .bottomnav .faqat-mobil { display: none; }
    .bottomnav a.active::before { display: none; }
    .bottomnav .pn-ic { display: contents; }
    .bottomnav .nav-badge { position: static; order: 2; margin-left: auto; box-shadow: none; }
    .bottomnav a:has(.nav-badge) { justify-content: flex-start; }
    .bottomnav .nav-bolim {
        display: block;
        color: var(--sidebar-matn);
        font-size: .6875rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .08em;
        padding: 18px 12px 6px;
        opacity: .8;
    }
    .bottomnav .faqat-katta { display: flex; }
    .bottomnav a {
        flex: none;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        min-height: 44px;
        padding: 10px 12px;
        border-radius: var(--radius-kichik);
        color: var(--sidebar-matn);
        font-size: .9375rem;
        transition: background .12s, color .12s;
    }
    .bottomnav a .ic { width: 20px; height: 20px; }
    .bottomnav a:hover { background: var(--fon); color: var(--siyoh); }
    .bottomnav a.active {
        background: var(--sidebar-aktiv);
        color: var(--asosiy-matn);
        font-weight: 700;
    }
    .bottomnav a.active .ic { color: var(--asosiy-matn); }
    .bottomnav a .nav-ext { margin-left: auto; width: 14px; height: 14px; }

    body:has(.bottomnav) .topbar { padding-left: 24px; padding-right: 16px; }

    /* keng ekranda ro'yxatlar 2 ustun, statlar 4 ustun */
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .products { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
    .products > .card { margin-bottom: 0; }
    .bar .joy { height: 120px; }
}

/* ---------- Analitika sahifasi (G3) — tizim token'lari bilan ---------- */
/* Ikkili ustun-grafik: har kunda savdo (och ko'k) + foyda (yashil) yonma-yon */
.bars.ikkili { gap: 6px; }
.bars.ikkili.zich { gap: 2px; }
.bars.ikkili .joy { gap: 1px; }
.bars.ikkili .ustun { width: 55%; }
.bars.ikkili .ustun.foyda { width: 45%; background: #9FD8BD; }
.bars.ikkili .bar:hover .ustun.foyda { background: var(--kok); }
.bars.ikkili .ustun.foyda.zarar { background: var(--qizil-fon); }
.bars.ikkili.zich .kun { font-size: .6875rem; }
/* zich grafik: yorliq ustun kengligiga ta'sir qilmaydi va qo'shni ustunlar ostiga kirmaydi
   (yorliqsiz ustunlar pastga siljib, yorliqni bosib ketardi — audit §3 Analitika) */
.bars.ikkili.zich { padding-bottom: 22px; }
.bars.ikkili.zich .bar { position: relative; }
.bars.ikkili.zich .kun {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 4px;
    white-space: nowrap;
}
.bars.ikkili.zich .bar:first-child .kun { left: 0; transform: none; }
.bars.ikkili.zich .bar:last-child .kun { left: auto; right: 0; transform: none; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: .8125rem; color: var(--kul); }
.legend .rang { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend .rang.savdo { background: var(--ustun); }
.legend .rang.foyda { background: #9FD8BD; }
.legend .rang.naqd { background: var(--asosiy); }
.legend .rang.karta { background: var(--kok); }
.legend .rang.qarz { background: var(--sariq); }

/* Top mahsulotlar — gorizontal barlar */
.hbar-card { padding: 12px 16px; }
.hbar { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.hbar + .hbar { border-top: 1px solid var(--fon); }
.hbar .nom {
    flex: 0 0 38%; min-width: 0; font-size: .875rem; font-weight: 600; line-height: 1.3;
    overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
}
.blok-harakat { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.blok-harakat .button { flex: 1 1 140px; }
.hbar .chiziq { flex: 1; height: 16px; background: var(--fon); border-radius: 5px; overflow: hidden; }
.hbar .chiziq i { display: block; height: 100%; background: var(--asosiy-yorqin); border-radius: 5px; }
.hbar .qiymat { flex: 0 0 auto; text-align: right; font-weight: 700; font-size: .875rem; font-variant-numeric: tabular-nums; }
.hbar .qiymat small { display: block; font-weight: 400; }

/* To'lov turlari — foiz chiziq */
.ulush-line { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--fon); margin-bottom: 12px; }
.ulush-line i { display: block; height: 100%; }
.ulush-line i.naqd { background: var(--asosiy); }
.ulush-line i.karta { background: var(--kok); }
.ulush-line i.qarz { background: var(--sariq); }
.tolov-legend { flex-direction: column; gap: 6px; margin-top: 0; }

/* Kategoriya chiplari (katalog + panel filtri, G7) */
.kat-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.kat-chips a { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: var(--oq); border: 1px solid var(--chiziq-quyuq); color: var(--siyoh); text-decoration: none; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.kat-chips a:hover { border-color: var(--asosiy); }
.kat-chips a.on { background: var(--asosiy); border-color: var(--asosiy); color: #fff; }

/* ---------- Brend belgisi — konsept №2 "Ikki tomon" (docs/brand/logo) ---------- */


/* Login/xato sahifasi: markazda to'liq gorizontal logo */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

/* Tarif tarkibi (Sozlamalar) */
.tariflar { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin: 8px 0 12px; }
.tarif { border: 1px solid var(--chiziq); border-radius: 12px; padding: 12px 14px; }
.tarif.joriy { border: 2px solid var(--asosiy); }
.tarif h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.tarif-belgi { background: var(--asosiy); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; }
.tarif-narx { margin: 4px 0 8px; }
.tarif ul { margin: 0; padding-left: 18px; }
.tarif li { margin: 2px 0; }

/* Boshqa: "Chiqish" (eslab qolishni unutish) */
.chiqish-forma { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 20px 0 8px; text-align: center; }
.chiqish-forma small { color: var(--matn-2, #65676b); }

/* ---------- Xodimlar (sotuvchilar), ish haqi, xodim bosh sahifasi ---------- */
.xodim-havolalar, .xodim-tugmalar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.xodim-havolalar .button, .xodim-tugmalar .button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0; min-height: 48px;
}
.xodim-tugmalar .button.primary { grid-column: 1 / -1; }
.xodim-havolalar .ic, .xodim-tugmalar .ic { width: 18px; height: 18px; }
.huquq-tanlov { border: none; margin: 0 0 12px; padding: 0; min-width: 0; }
.huquq-tanlov legend { font-size: .9375rem; font-weight: 600; color: var(--siyoh); padding: 0; margin-bottom: 4px; }
.huquq-tanlov label.checkbox { margin-bottom: 4px; align-items: flex-start; padding: 8px 0; min-height: 0; }
.huquq-tanlov label.checkbox input { margin-top: 2px; }
.huquq-tanlov label.checkbox small { font-weight: 400; }
.havola-matn { width: 100%; font-size: .8125rem; margin: 8px 0; font-family: ui-monospace, monospace; }
.card.form > small { display: block; margin: 4px 0 8px; }
.mini-stat { text-align: center; padding: 14px 8px; }
.mini-stat strong { display: block; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0; }
.ih-bosh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ih-bosh strong { font-size: 1.0625rem; overflow-wrap: anywhere; }
.ih-hisob { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 0 0 12px; }
.ih-hisob div { display: flex; flex-direction: column; min-width: 0; }
.ih-hisob dt { font-size: .8125rem; color: var(--kul); }
.ih-hisob dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.ih-tolov { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ih-tolov input { margin: 0; min-width: 0; }
.ih-tolov button { grid-column: 1 / -1; }
.davr-tabs { overflow-x: auto; }
.davr-tabs a { white-space: nowrap; }
/* ---------- Shtrix-kod skaneri (skaner.js) ---------- */
.skaner-qator { display: flex; gap: 8px; align-items: stretch; }
.skaner-qator input { flex: 1; min-width: 0; }
.skaner-qator .skaner-btn { flex-shrink: 0; margin-top: 6px; min-height: var(--maydon-b); padding: 8px 12px; white-space: nowrap; }
.skaner-blok { margin-bottom: 4px; }
.skaner-blok label { margin-bottom: 8px; }
.skaner-holat { margin: 0 0 16px; }
.skaner-holat .button { min-height: 40px; padding: 6px 12px; margin-top: 8px; display: inline-flex; }
.import-link { margin-bottom: 12px; }
.skaner-oyna {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(28, 30, 33, .85);
    display: flex; align-items: center; justify-content: center; padding: 16px;
}
.skaner-quti { background: var(--oq); border-radius: var(--radius); padding: 16px; width: 100%; max-width: 420px; }
.skaner-video-joy { position: relative; border-radius: var(--radius-kichik); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.skaner-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.skaner-ramka {
    position: absolute; left: 10%; right: 10%; top: 32%; bottom: 32%;
    border: 3px solid #fff; border-radius: 8px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .25);
}
.skaner-izoh { margin: 12px 0 8px; text-align: center; color: var(--kul); }
.skaner-qolda { display: flex; gap: 8px; }
.skaner-qolda input { flex: 1; min-width: 0; }
.skaner-qolda button { margin-top: 6px; flex-shrink: 0; }
.skaner-yopish { width: 100%; margin-top: 12px; }
.import-jadval td { vertical-align: top; }
.import-jadval.xatolar td:last-child { font-weight: 400; text-align: left; }
.import-jadval .eski { display: block; font-size: .8125rem; font-weight: 400; white-space: nowrap; }
.import-jadval td.num { white-space: nowrap; }

/* ---------- Sklad nazorati: inventarizatsiya (sanash) va hisobdan chiqarish ---------- */
.matn-havola { color: var(--asosiy-matn); font-weight: 600; text-decoration: none; padding: 10px 4px; display: inline-block; }
.matn-havola:hover { text-decoration: underline; }
.sanash-sarlavha { margin-bottom: 8px; }
.sanash-shapka {
    position: sticky; top: 0; z-index: 5;
    background: var(--sahifa);
    padding: 8px 0 10px;
    border-bottom: 1px solid var(--chiziq);
    margin: 0 0 8px;
}
.sanash-qidiruv { margin-top: 0; }
.sanash-holat { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--kul); }
.sanash-holat b { color: var(--siyoh); font-variant-numeric: tabular-nums; }
.sanash-holat .primary-link { margin: 0; min-height: 40px; padding: 0 14px; font-size: .9375rem; }
.sanash-izoh { margin: 4px 0 10px; }
.sanash-royxat { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.sanash-qator {
    background: var(--oq);
    border: 1.5px solid var(--chiziq);
    border-radius: var(--radius);
    padding: 10px 12px;
    scroll-margin-top: 140px;
}
.sanash-qator:focus-within { border-color: var(--asosiy); box-shadow: 0 0 0 3px var(--asosiy-fon); }
.sanash-qator.sanaldi { border-left: 5px solid var(--musbat); }
.sanash-qator.sanaldi.kamomad { border-left-color: var(--qizil); }
.sanash-qator.sanaldi.ortiqcha { border-left-color: var(--sariq); }
.sanash-forma { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.sanash-nom { display: block; min-width: 0; font-weight: 400; }
.sanash-nom b { display: block; font-size: 1.0625rem; line-height: 1.3; overflow-wrap: anywhere; }
.sanash-meta { display: block; margin-top: 2px; }
.sanash-qator.kamomad .sanash-natija { color: var(--qizil); font-weight: 600; }
.sanash-qator.ortiqcha .sanash-natija { color: var(--sariq-matn); font-weight: 600; }
.sanash-kiritish { display: flex; gap: 6px; align-items: center; }
.sanash-input {
    width: 96px; min-height: 56px; margin: 0;
    font-size: 1.5rem; font-weight: 700; text-align: center;
    font-variant-numeric: tabular-nums;
}
.sanash-ok {
    min-width: 52px; min-height: 56px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--asosiy-fon); color: var(--asosiy-matn);
    border: 1.5px solid var(--asosiy-chiziq); border-radius: var(--radius-kichik);
}
.sanash-qator.sanaldi .sanash-ok { background: var(--musbat-fon); color: var(--musbat); border-color: var(--musbat); }
.sanash-xato { grid-column: 1 / -1; color: var(--qizil); font-weight: 600; }
.sanash-oxiri .button { flex: 1; }
.inventar-jami .stat strong { display: block; font-size: 1.375rem; margin: 4px 0 2px; }
.inventar-jami .stat > span { color: var(--kul); font-weight: 600; font-size: .9375rem; }
.amal-qator { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0 16px; }
.amal-qator button { flex: 1 1 220px; }

/* Chop: sotuvlarda chek tanlash, mahsulotlarda yorliq tanlash */
.chek-tanlov { margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chek-tanlov button { flex: 1 1 200px; }
.chek-belgi { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px;
    color: var(--kul); font-size: .9375rem; cursor: pointer; }
.chek-belgi input { width: 20px; height: 20px; margin: 0; }
.success .chek-link { margin-left: 8px; font-weight: 700; color: var(--asosiy-matn); }
.yorliq-tanlov { gap: 8px; }
.yorliq-n { width: 76px; min-height: 40px; }
.yorliq-forma select { flex: 1 1 160px; }

/* ---------- Telefon + PIN kirish (/kirish) ---------- */
.kirish { max-width: 400px; margin: 0 auto; padding: 7vh 16px 32px; }
.kirish .auth-brand { text-align: center; margin-bottom: 20px; }
.kirish h1 { font-size: 1.5rem; margin: 0 0 4px; text-align: center; }
.kirish .kirish-izoh { text-align: center; color: var(--kul); margin: 0 0 20px; }
.kirish form.card { padding: 20px 16px; }
.tel-maydon { display: flex; align-items: stretch; margin-top: 6px; }
.tel-maydon .prefiks {
    display: flex; align-items: center; padding: 0 12px;
    border: 1.5px solid var(--chiziq-quyuq); border-right: 0;
    border-radius: var(--radius-kichik) 0 0 var(--radius-kichik);
    background: var(--fon); color: var(--siyoh); font-size: 1.0625rem; font-weight: 600;
}
.tel-maydon input { margin-top: 0; border-radius: 0 var(--radius-kichik) var(--radius-kichik) 0;
    letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.pin-kataklar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 6px; }
.pin-kataklar input {
    margin-top: 0; padding: 0; height: 52px; text-align: center;
    font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums;
    -webkit-text-security: disc;
}
.eslab-qator { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin: 4px 0 16px; }
.eslab-qator input { width: 22px; min-height: 22px; height: 22px; margin: 0; }
.kirish button[type=submit] { width: 100%; }
.kirish details.unutdim { margin-top: 16px; text-align: center; }
.kirish details.unutdim summary { cursor: pointer; color: var(--asosiy-matn); font-weight: 600; list-style: none; }
.kirish details.unutdim summary::-webkit-details-marker { display: none; }
.kirish details.unutdim p { color: var(--kul); margin: 10px 0 0; }
.kirish .boshqa-yol { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--chiziq);
    color: var(--kul); font-size: .9375rem; text-align: center; }
.kirish code { background: var(--oq); border: 1px solid var(--chiziq); padding: 1px 6px; border-radius: 6px; }
.rol-royxat { display: grid; gap: 10px; }
.rol-royxat button { width: 100%; justify-content: space-between; text-align: left; }
.rol-royxat small { color: var(--kul); font-weight: 500; }
