/*!
 * Shtrix-kod generatori — Xurshid.Com dizayniga moslangan uslublar
 * ---------------------------------------------------------------
 * Sayt tokenlari (custom.css dagi --accent-color, --grad-accent,
 * --radius-*, --shadow-*, --line, --ink-*) qayta ishlatiladi.
 * Uslub QR-Code Generator vositasi bilan bir xil dizayn tilida.
 *
 * Barcha qoidalar .bc-scope ichida (#bcApp, sozlamalar/tarix
 * panellari, yuklab olish/ma'lumotnoma oynalari, bildirishnomalar) —
 * saytning boshqa qismlariga ta'sir qilmaydi.
 * ---------------------------------------------------------------
 */

/* ==================================================================
   0. UMUMIY O'ZGARUVCHILAR VA ASOSLAR
   ================================================================== */

.bc-scope {
    --bc-mono: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono",
               "Liberation Mono", Menlo, monospace;
    --bc-surface-2: #f8fafc;
    --bc-surface-3: #f1f5f9;
    --bc-accent-dark: #0a9a55;
    --bc-danger: #e11d48;
    --bc-danger-soft: rgba(225, 29, 72, .08);
    --bc-warn: #b45309;
    --bc-warn-soft: rgba(217, 119, 6, .10);
    --bc-sticky-top: 92px;

    /* Bootstrap komponentlari sayt rangini olsin */
    --bs-primary: #10bc69;
    --bs-primary-rgb: 16, 188, 105;
    --bs-link-color: #10bc69;
    --bs-link-color-rgb: 16, 188, 105;
    --bs-link-hover-color: #0a9a55;
    --bs-link-hover-color-rgb: 10, 154, 85;
    --bs-focus-ring-color: rgba(16, 188, 105, .25);
}

/* Saytda global `section { padding: 72px 0; overflow: clip }` bor —
   ma'lumotnoma ichida JS yaratadigan <section> lar uni meros qilmasin */
.bc-scope section {
    padding: 0;
    background-color: transparent;
    color: inherit;
    overflow: visible;
    scroll-margin-top: 0;
}

.bc-scope .min-w-0 { min-width: 0; }
.bc-scope .font-mono { font-family: var(--bc-mono); font-size: .88rem; }

.bc-scope h1, .bc-scope h2, .bc-scope h3 { color: var(--ink-900); }

/* ==================================================================
   1. YUQORI PANEL (statistika + tugmalar)
   ================================================================== */

#bcApp .bc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 14px 12px 16px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-xs);
}

#bcApp .bc-stats { display: flex; flex-wrap: wrap; gap: 8px; }

#bcApp .bc-stat {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid rgba(16, 188, 105, .2);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--ink-700);
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.2;
}

#bcApp .bc-stat i { color: var(--accent-color); font-size: .98rem; }
#bcApp .bc-stat strong { color: var(--accent-color); font-weight: 800; font-variant-numeric: tabular-nums; }

#bcApp .bc-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }

#bcApp .bc-tbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid var(--ink-200);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-700);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all .25s var(--ease);
}

#bcApp .bc-tbtn i { font-size: 1rem; color: var(--ink-500); transition: color .25s var(--ease); }
#bcApp .bc-tbtn:hover { border-color: var(--accent-color); color: var(--accent-color); transform: translateY(-1px); }
#bcApp .bc-tbtn:hover i { color: var(--accent-color); }
#bcApp .bc-tbtn:focus-visible { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ==================================================================
   2. KARTALAR
   ================================================================== */

/* overflow: hidden ataylab ishlatilmagan — aks holda "Nusxalash"
   ochiluvchi menyusi karta chegarasida kesilib qoladi */
.bc-scope .bc-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: box-shadow .35s var(--ease);
}

.bc-scope .bc-card:hover { box-shadow: var(--shadow-sm); }

.bc-scope .bc-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
    background: linear-gradient(180deg, #fcfefd 0%, #ffffff 100%);
}

.bc-scope .bc-card-head > i { font-size: 1.15rem; color: var(--accent-color); }

.bc-scope .bc-card-head h2 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ink-900);
}

.bc-scope .bc-card-body { padding: 22px; }

.bc-scope .bc-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .3px;
    font-variant-numeric: tabular-nums;
}

/* Kichik dumaloq ikonka-tugma (info, nusxalash, sozlamalar) */
.bc-scope .bc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: #fff;
    color: var(--ink-500);
    font-size: 1.02rem;
    cursor: pointer;
    transition: all .25s var(--ease);
}

.bc-scope .bc-icon-btn:hover,
.bc-scope .bc-icon-btn[aria-expanded="true"] {
    border-color: var(--accent-color);
    background: var(--accent-soft);
    color: var(--accent-color);
}

.bc-scope .bc-icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent-color); }

.bc-scope .bc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-color);
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bc-scope .bc-link:hover { color: var(--bc-accent-dark); }
.bc-scope .bc-link:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 3px; border-radius: 4px; }

/* ==================================================================
   3. TUGMALAR (Bootstrap .btn sayt uslubida)
   ================================================================== */

.bc-scope .btn {
    --bs-btn-padding-x: 20px;
    --bs-btn-padding-y: 10px;
    --bs-btn-font-size: .9rem;
    --bs-btn-font-weight: 600;
    --bs-btn-line-height: 1.2;
    --bs-btn-border-radius: 999px;
    --bs-btn-focus-box-shadow: 0 0 0 3px var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    transition: all .28s var(--ease);
}

.bc-scope .btn-sm {
    --bs-btn-padding-x: 14px;
    --bs-btn-padding-y: 7px;
    --bs-btn-font-size: .8rem;
    gap: 6px;
}

.bc-scope .btn .bi { font-size: 1.02em; line-height: 1; }

.bc-scope .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--accent-color);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--accent-color);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--bc-accent-dark);
    --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--accent-color);
    --bs-btn-disabled-border-color: transparent;
    --bs-btn-focus-box-shadow: 0 0 0 3px rgba(16, 188, 105, .3);
    background-image: var(--grad-accent);
    box-shadow: 0 8px 20px rgba(16, 188, 105, .25);
}

.bc-scope .btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(16, 188, 105, .32);
}

.bc-scope .btn-soft {
    --bs-btn-color: var(--ink-700);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--ink-200);
    --bs-btn-hover-color: var(--accent-color);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-border-color: var(--accent-color);
    --bs-btn-active-color: var(--accent-color);
    --bs-btn-active-bg: var(--accent-soft);
    --bs-btn-active-border-color: var(--accent-color);
    --bs-btn-disabled-color: var(--ink-500);
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: var(--ink-200);
}

.bc-scope .btn:disabled,
.bc-scope .btn.disabled { opacity: .55; }

/* ==================================================================
   4. SHTRIX-KOD TURLARI (chap panel)
   ================================================================== */

#bcApp .bc-types-card { display: flex; flex-direction: column; }

#bcApp .bc-types-search { padding: 14px 14px 10px; background: #fff; }

.bc-scope .search-box { position: relative; }

.bc-scope .search-box > .bi {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--ink-500);
    pointer-events: none;
}

.bc-scope .search-box .form-control {
    padding-left: 40px;
    border-color: transparent;
    background-color: var(--bc-surface-3);
}

.bc-scope .search-box .form-control:focus { background-color: #fff; border-color: var(--accent-color); }

/* Akkordeon */
#bcApp .types-accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-width: 0;
    --bs-accordion-btn-bg: transparent;
    --bs-accordion-active-bg: var(--accent-soft);
    --bs-accordion-active-color: var(--ink-900);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 3px var(--accent-soft);
    --bs-accordion-btn-icon-width: .85rem;
    --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2310bc69' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
    padding: 0 8px 10px;
}

#bcApp .types-accordion .accordion-item { border: 0; margin-bottom: 3px; }

#bcApp .types-accordion .accordion-button {
    gap: 10px;
    padding: 8px 10px;
    border-radius: 14px !important;
    color: var(--ink-700);
    font-size: .9rem;
    box-shadow: none;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}

#bcApp .types-accordion .accordion-button:hover { background-color: var(--bc-surface-2); }
#bcApp .types-accordion .accordion-button:not(.collapsed) { background-color: var(--accent-soft); color: var(--ink-900); box-shadow: none; }
#bcApp .types-accordion .accordion-button:focus-visible { box-shadow: var(--bs-accordion-btn-focus-box-shadow); }
#bcApp .types-accordion .accordion-button::after { margin-left: 4px; }

.bc-scope .cat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-size: 1rem;
    transition: all .25s var(--ease);
}

#bcApp .accordion-button:not(.collapsed) .cat-icon {
    background: var(--grad-accent);
    color: #fff;
    box-shadow: 0 6px 14px rgba(16, 188, 105, .28);
}

#bcApp .cat-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
#bcApp .cat-name { font-weight: 700; font-size: .88rem; }
#bcApp .cat-en { font-size: .7rem; color: var(--ink-500); }

#bcApp .cat-count {
    margin-left: auto;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--bc-surface-3);
    color: var(--ink-500);
    font-size: .72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

#bcApp .accordion-button:not(.collapsed) .cat-count { background: #fff; color: var(--accent-color); }

#bcApp .types-accordion .accordion-body { padding: 4px 0 8px 26px; }

#bcApp .type-list {
    margin: 0;
    padding: 0 0 0 10px;
    list-style: none;
    border-left: 2px solid var(--ink-100);
}

#bcApp .type-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-700);
    font-size: .86rem;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: background-color .2s var(--ease), color .2s var(--ease), padding-left .2s var(--ease);
}

#bcApp .type-item:hover { background: var(--bc-surface-2); color: var(--accent-color); padding-left: 16px; }
#bcApp .type-item:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

#bcApp .type-item.active {
    background: var(--grad-accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(16, 188, 105, .24);
}

#bcApp .type-off {
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bc-warn-soft);
    color: var(--bc-warn);
    font-size: .64rem;
    font-weight: 700;
    white-space: nowrap;
}

#bcApp .type-item.active .type-off { background: rgba(255, 255, 255, .22); color: #fff; }

#bcApp .types-empty {
    margin: 0;
    padding: 18px 16px 22px;
    text-align: center;
    color: var(--ink-500);
    font-size: .88rem;
}

/* Kompyuter: panel yopishqoq, ro'yxat ichida aylanadi */
@media (min-width: 1200px) {
    #bcApp .bc-types-offcanvas { position: sticky; top: var(--bc-sticky-top); }
    #bcApp .bc-types-card { max-height: calc(100vh - var(--bc-sticky-top) - 24px); }
    #bcApp .types-accordion {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        /* Pastki qism yumshoq so'nadi — ro'yxat aylanishini bildiradi */
        -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
        mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
        padding-bottom: 22px;
    }
}

/* Planshet / telefon: chapdan chiqadigan panel */
@media (max-width: 1199.98px) {
    #bcApp .bc-types-offcanvas {
        --bs-offcanvas-width: min(380px, 92vw);
        border-right: 0;
        box-shadow: var(--shadow-lg);
    }

    #bcApp .bc-types-offcanvas .offcanvas-body { padding: 0; }
    #bcApp .bc-types-card { border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
    #bcApp .bc-types-search { position: sticky; top: 0; z-index: 2; padding-top: 12px; }
}

/* ==================================================================
   5. MA'LUMOT KIRITISH
   ================================================================== */

#bcApp .data-card { scroll-margin-top: var(--bc-sticky-top); }
#bcApp .bc-fmt-head { align-items: flex-start; }

#bcApp .fmt-category {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

#bcApp .fmt-name {
    margin: 3px 0 0;
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1.25;
    color: var(--ink-900);
    overflow-wrap: anywhere;
}

#bcApp .fmt-info {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bc-surface-2);
    color: var(--ink-700);
    font-size: .88rem;
    line-height: 1.6;
}

#bcApp .fmt-help { color: var(--ink-500); font-size: .84rem; }
#bcApp .fmt-more { font-size: .82rem; }

/* --- Forma elementlari (barcha oynalar uchun umumiy) --- */
.bc-scope .form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink-500);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .3px;
    line-height: 1.4;
    text-transform: uppercase;
}

.bc-scope .form-label .req { margin-left: 3px; color: var(--bc-danger); }

.bc-scope .form-control,
.bc-scope .form-select {
    padding: 11px 14px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-sm);
    background-color: #fff;
    color: var(--ink-900);
    font-size: .92rem;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}

.bc-scope .form-select { padding-right: 40px; background-position: right 14px center; cursor: pointer; }

.bc-scope .form-control:focus,
.bc-scope .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.bc-scope .form-control::placeholder { color: #94a3b8; }
.bc-scope .form-control:disabled { background-color: var(--bc-surface-3); color: var(--ink-500); }

.bc-scope .form-control.is-invalid,
.bc-scope .form-select.is-invalid {
    border-color: var(--bc-danger) !important;
}

.bc-scope .form-control.is-invalid:focus { box-shadow: 0 0 0 3px var(--bc-danger-soft); }

.bc-scope textarea.form-control { min-height: 76px; line-height: 1.55; resize: vertical; }

.bc-scope .form-text,
.bc-scope .field-hint {
    margin-top: 6px;
    color: var(--ink-500);
    font-size: .8rem;
    line-height: 1.55;
}

/* Belgilash katakchalari va kalitlar */
.bc-scope .form-check-input { cursor: pointer; border-color: #cbd5e1; }

.bc-scope .form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.bc-scope .form-check-input:focus {
    border-color: #88dfb4;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.bc-scope .form-switch .form-check-input:focus:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2388dfb4'/%3e%3c/svg%3e");
}

.bc-scope .form-check-label { color: var(--ink-700); font-size: .9rem; cursor: pointer; }

/* Ko'p qatorli rejim */
#bcApp .batch-toggle {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(16, 188, 105, .22);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
}

#bcApp .batch-toggle .form-check-label { font-size: .88rem; line-height: 1.5; }
#bcApp .batch-toggle .form-check-label strong { color: var(--ink-900); }
#bcApp .batch-toggle .form-check-label span { color: var(--ink-500); }
#bcApp .batch-box { margin-bottom: 16px; }
#bcApp .batch-box .field-hint { font-variant-numeric: tabular-nums; }

/* Maxsus parametrlar */
#bcApp .options-block {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px dashed var(--ink-200);
}

#bcApp .options-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--ink-900);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
}

#bcApp .options-toggle > .bi:first-child { color: var(--accent-color); }
#bcApp .options-toggle .chev { color: var(--ink-500); transition: transform .25s var(--ease); }
#bcApp .options-toggle.collapsed .chev { transform: rotate(-90deg); }
#bcApp .options-toggle:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 3px; border-radius: 6px; }

/* Parol maydoni */
#bcApp .pass-wrap { position: relative; }
#bcApp .pass-wrap .form-control { padding-right: 46px; }

#bcApp .pass-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink-500);
    transform: translateY(-50%);
    cursor: pointer;
    transition: all .2s var(--ease);
}

#bcApp .pass-toggle:hover { background: var(--bc-surface-3); color: var(--accent-color); }

/* Server izohlari (tekshiruv raqami qo'shildi va h.k.) */
#bcApp .notices { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
#bcApp .notices:empty { display: none; }

#bcApp .notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid rgba(16, 188, 105, .18);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: #0b7a45;
    font-size: .84rem;
    line-height: 1.55;
}

#bcApp .notice .bi { margin-top: 2px; }

#bcApp .notice.warn {
    border-color: rgba(217, 119, 6, .25);
    background: var(--bc-warn-soft);
    color: var(--bc-warn);
}

/* Xatolik va ogohlantirish bloklari */
#bcApp .error-box,
#bcApp .bc-alert-warn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0 0;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    line-height: 1.6;
}

#bcApp .error-box {
    border: 1px solid rgba(225, 29, 72, .2);
    background: var(--bc-danger-soft);
    color: #9f1239;
}

#bcApp .error-box > .bi { color: var(--bc-danger); font-size: 1.05rem; line-height: 1.4; }

#bcApp .bc-alert-warn {
    margin: 0 0 16px;
    border: 1px solid rgba(217, 119, 6, .25);
    background: var(--bc-warn-soft);
    color: var(--bc-warn);
}

#bcApp .error-box.d-none,
#bcApp .bc-alert-warn.d-none { display: none; }

/* Forma tugmalari */
#bcApp .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

/* ==================================================================
   6. NATIJA (ko'rib chiqish)
   ================================================================== */

#bcApp .bc-sticky { position: sticky; top: var(--bc-sticky-top); }

#bcApp .result-toolbar { display: flex; align-items: center; gap: 8px; }

#bcApp .live-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 0 0 rgba(16, 188, 105, .55);
    animation: bcPulse 2s infinite;
}

@keyframes bcPulse {
    0%   { box-shadow: 0 0 0 0 rgba(16, 188, 105, .5); }
    70%  { box-shadow: 0 0 0 8px rgba(16, 188, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 188, 105, 0); }
}

/* Ko'rinish maydoni: shaffof fonni ko'rsatish uchun nozik katakli fon */
#bcApp .preview-wrap {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 300px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--bc-surface-2);
    background-image:
        linear-gradient(45deg, #eef2f6 25%, transparent 25%),
        linear-gradient(-45deg, #eef2f6 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eef2f6 75%),
        linear-gradient(-45deg, transparent 75%, #eef2f6 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

#bcApp .preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: opacity .2s var(--ease);
}

#bcApp .preview-stage svg {
    display: block;
    max-width: 100%;
    max-height: 420px;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, .10));
}

#bcApp .preview-stage.dim { opacity: .3; }

#bcApp .preview-empty { padding: 24px 12px; text-align: center; color: var(--ink-500); }
#bcApp .preview-empty .bi { display: block; margin-bottom: 12px; font-size: 3.2rem; color: var(--ink-200); }
#bcApp .preview-empty p { max-width: 260px; margin: 0 auto; font-size: .88rem; }

#bcApp .preview-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(248, 250, 252, .55);
}

#bcApp .preview-loading.d-none { display: none; }

#bcApp .loader-bars { display: flex; align-items: stretch; gap: 4px; height: 34px; }

#bcApp .loader-bars span {
    width: 5px;
    border-radius: 3px;
    background: var(--accent-color);
    animation: bcBars 1s ease-in-out infinite;
}

#bcApp .loader-bars span:nth-child(2) { width: 3px; animation-delay: .1s; }
#bcApp .loader-bars span:nth-child(3) { width: 7px; animation-delay: .2s; }
#bcApp .loader-bars span:nth-child(4) { width: 3px; animation-delay: .3s; }
#bcApp .loader-bars span:nth-child(5) { animation-delay: .4s; }

@keyframes bcBars {
    0%, 100% { transform: scaleY(.4); opacity: .5; }
    50%      { transform: scaleY(1);  opacity: 1; }
}

/* O'lcham ma'lumotlari */
#bcApp .result-meta { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
#bcApp .meta-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#bcApp .meta-chips:empty { display: none; }

#bcApp .meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-500);
    font-size: .78rem;
    font-weight: 500;
}

#bcApp .meta-chip .bi { color: var(--accent-color); }
#bcApp .meta-chip strong { color: var(--ink-900); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Kodlangan qiymat */
#bcApp .value-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px 8px 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bc-surface-2);
}

#bcApp .value-label {
    color: var(--ink-500);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
}

#bcApp .value-text {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
    color: var(--ink-900);
    font-family: var(--bc-mono);
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#bcApp .value-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink-500);
    cursor: pointer;
    transition: all .2s var(--ease);
}

#bcApp .value-copy:hover { background: #fff; color: var(--accent-color); box-shadow: var(--shadow-xs); }

/* Asosiy amallar */
#bcApp .result-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 10px;
    margin-top: 16px;
}

/* --- Ko'p qatorli natijalar --- */
#bcApp .batch-results { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
#bcApp .batch-results.d-none { display: none; }

#bcApp .batch-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

#bcApp .batch-count {
    font-family: var(--heading-font);
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--ink-900);
}

#bcApp .batch-err-sum { color: var(--bc-danger); font-size: .82rem; font-weight: 600; }
#bcApp .batch-actions { display: flex; flex-wrap: wrap; gap: 8px; }

#bcApp .batch-errors {
    max-height: 160px;
    margin-bottom: 14px;
    padding: 10px 14px;
    overflow-y: auto;
    border: 1px solid rgba(225, 29, 72, .2);
    border-radius: var(--radius-sm);
    background: var(--bc-danger-soft);
    color: #9f1239;
    font-size: .82rem;
    line-height: 1.55;
}

#bcApp .batch-errors div + div { margin-top: 4px; }

#bcApp .batch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    max-height: 560px;
    padding: 2px;
    overflow-y: auto;
}

#bcApp .batch-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}

#bcApp .batch-item:hover { transform: translateY(-2px); border-color: rgba(16, 188, 105, .35); box-shadow: var(--shadow-sm); }

#bcApp .batch-thumb {
    display: grid;
    place-items: center;
    height: 108px;
    padding: 6px;
    border: 1px solid var(--bc-surface-3);
    border-radius: 10px;
    background: #fff;
}

#bcApp .batch-thumb svg { max-width: 100%; max-height: 94px; }

#bcApp .batch-label {
    overflow: hidden;
    color: var(--ink-700);
    font-family: var(--bc-mono);
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#bcApp .batch-label .num { margin-right: 5px; color: var(--accent-color); font-weight: 700; }
#bcApp .batch-btns { display: flex; gap: 6px; }

#bcApp .batch-btns .btn {
    --bs-btn-padding-x: 8px;
    --bs-btn-padding-y: 5px;
    --bs-btn-font-size: .74rem;
    flex: 1 1 0;
}

/* Nusxalash menyusi */
.bc-scope .bc-dropdown {
    --bs-dropdown-link-active-bg: var(--accent-color);
    --bs-dropdown-link-active-color: #fff;
    min-width: 236px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}

.bc-scope .bc-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ink-700);
    font-size: .86rem;
    font-weight: 500;
}

.bc-scope .bc-dropdown .dropdown-item .bi { color: var(--accent-color); }
.bc-scope .bc-dropdown .dropdown-item:hover,
.bc-scope .bc-dropdown .dropdown-item:focus { background: var(--accent-soft); color: var(--accent-color); }

/* ==================================================================
   7. IMKONIYATLAR QATORI
   ================================================================== */

#bcApp .bc-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

#bcApp .bc-feature {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-700);
    font-size: .84rem;
    font-weight: 600;
}

#bcApp .bc-feature i { color: var(--accent-color); font-size: 1rem; }

/* ==================================================================
   8. YON PANELLAR (sozlamalar, tarix, turlar — telefon)
   ================================================================== */

.bc-scope.offcanvas,
.bc-scope .offcanvas-xl {
    --bs-offcanvas-bg: #fff;
}

.bc-offcanvas {
    --bs-offcanvas-width: min(400px, 100vw);
    border-left: 0 !important;
    box-shadow: var(--shadow-lg);
}

.bc-scope .offcanvas-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fcfefd 0%, #ffffff 100%);
}

.bc-scope .offcanvas-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.06rem;
    font-weight: 800;
    color: var(--ink-900);
}

.bc-scope .offcanvas-title > .bi { color: var(--accent-color); }

.bc-offcanvas .offcanvas-body { padding: 18px 20px 22px; background: var(--bc-surface-2); }

/* Sozlamalar guruhlari */
.bc-offcanvas .set-group {
    margin-bottom: 14px;
    padding: 16px 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.bc-offcanvas .set-group.d-none { display: none; }

.bc-offcanvas .set-group legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
    color: var(--accent-color);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .6px;
    line-height: 1.3;
    text-transform: uppercase;
}

.bc-offcanvas .set-group legend .bi { font-size: .98rem; }

.bc-scope .bc-value { color: var(--accent-color); font-variant-numeric: tabular-nums; }

/* Segment tanlagich (burilish, ECC) */
.bc-scope .bc-segment {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bc-surface-2);
}

.bc-scope .bc-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    border-radius: 999px;
    color: var(--ink-500);
    font-size: .86rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all .25s var(--ease);
}

.bc-scope .bc-seg:hover { color: var(--accent-color); }

.bc-scope .btn-check:checked + .bc-seg {
    background: var(--grad-accent);
    color: #fff;
    box-shadow: 0 6px 14px rgba(16, 188, 105, .25);
}

.bc-scope .btn-check:focus-visible + .bc-seg { box-shadow: 0 0 0 3px var(--accent-soft); }
.bc-scope .btn-check:disabled + .bc-seg { opacity: .4; cursor: not-allowed; }

/* Masshtab slayderi */
.bc-scope .form-range::-webkit-slider-runnable-track { background-color: var(--ink-200); }
.bc-scope .form-range::-moz-range-track { background-color: var(--ink-200); }
.bc-scope .form-range::-webkit-slider-thumb { background-color: var(--accent-color); box-shadow: 0 2px 8px rgba(16, 188, 105, .4); }
.bc-scope .form-range::-moz-range-thumb { background-color: var(--accent-color); box-shadow: 0 2px 8px rgba(16, 188, 105, .4); }
.bc-scope .form-range::-webkit-slider-thumb:active { background-color: #88dfb4; }
.bc-scope .form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 1px #fff, 0 0 0 4px var(--accent-soft); }
.bc-scope .form-range:focus::-moz-range-thumb { box-shadow: 0 0 0 1px #fff, 0 0 0 4px var(--accent-soft); }

/* Rang tanlagich */
.bc-scope .form-control-color {
    height: 46px;
    padding: 4px;
    cursor: pointer;
}

.bc-scope .form-control-color::-webkit-color-swatch { border: 0; border-radius: 7px; }
.bc-scope .form-control-color::-moz-color-swatch { border: 0; border-radius: 7px; }

.bc-scope .bc-contrast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(217, 119, 6, .25);
    border-radius: var(--radius-sm);
    background: var(--bc-warn-soft);
    color: var(--bc-warn);
    font-size: .82rem;
    line-height: 1.5;
}

.bc-scope .bc-contrast.d-none { display: none; }

#textOptions { transition: opacity .25s var(--ease); }

/* --- Tarix --- */
.bc-offcanvas .bc-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 11px 14px;
    border: 1px solid rgba(16, 188, 105, .22);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--ink-700);
    font-size: .82rem;
    line-height: 1.55;
}

.bc-offcanvas .bc-note > .bi { color: var(--accent-color); font-size: 1.05rem; line-height: 1.3; }
.bc-offcanvas .bc-note strong { color: var(--ink-900); }

.bc-offcanvas .history-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }

.bc-offcanvas .history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink-700);
    text-align: left;
    cursor: pointer;
    transition: all .25s var(--ease);
}

.bc-offcanvas .history-item:hover { transform: translateY(-1px); border-color: rgba(16, 188, 105, .4); box-shadow: var(--shadow-sm); }
.bc-offcanvas .history-item:focus-visible { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--accent-soft); }

.bc-offcanvas .history-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-color);
}

.bc-offcanvas .history-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.bc-offcanvas .history-name { color: var(--ink-900); font-size: .88rem; font-weight: 700; }

.bc-offcanvas .history-value {
    overflow: hidden;
    color: var(--ink-500);
    font-family: var(--bc-mono);
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-offcanvas .history-time { margin-top: 2px; color: #94a3b8; font-size: .7rem; }

.bc-scope .bc-empty { padding: 28px 12px; text-align: center; color: var(--ink-500); }
.bc-scope .bc-empty.d-none { display: none; }
.bc-scope .bc-empty .bi { display: block; margin-bottom: 10px; font-size: 2.6rem; color: var(--ink-200); }
.bc-scope .bc-empty p { margin: 0; font-size: .88rem; }

/* ==================================================================
   9. OYNALAR (yuklab olish, ma'lumotnoma)
   ================================================================== */

.bc-modal .modal-content {
    border: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.bc-modal .modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fcfefd 0%, #ffffff 100%);
}

.bc-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--ink-900);
}

.bc-modal .modal-title > .bi { color: var(--accent-color); }
.bc-modal .modal-body { padding: 20px 22px; }

.bc-modal .modal-footer {
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: var(--bc-surface-2);
}

.bc-modal .modal-footer > * { margin: 0; }
.bc-modal p.form-label { margin-bottom: 10px; }

/* --- Yuklab olish: format kartalari --- */
.bc-modal .dl-options { display: grid; gap: 10px; }

.bc-modal .dl-option {
    display: grid;
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    padding: 12px 16px;
    border: 1.5px solid var(--ink-200);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: all .25s var(--ease);
}

.bc-modal .dl-option .bi {
    display: grid;
    place-items: center;
    grid-row: span 2;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-size: 1.35rem;
    transition: all .25s var(--ease);
}

.bc-modal .dl-option strong { color: var(--ink-900); font-size: .95rem; font-weight: 800; }
.bc-modal .dl-option span { color: var(--ink-500); font-size: .8rem; line-height: 1.45; }
.bc-modal .dl-option:hover { border-color: var(--accent-color); }

.bc-modal .btn-check:checked + .dl-option {
    border-color: var(--accent-color);
    background: #f3fcf7;
    box-shadow: 0 8px 20px rgba(16, 188, 105, .12);
}

.bc-modal .btn-check:checked + .dl-option .bi { background: var(--grad-accent); color: #fff; }
.bc-modal .btn-check:focus-visible + .dl-option { box-shadow: 0 0 0 3px var(--accent-soft); }

.bc-modal .dl-filename {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px dashed var(--ink-200);
    border-radius: var(--radius-sm);
    background: var(--bc-surface-2);
    color: var(--ink-500);
    font-family: var(--bc-mono);
    font-size: .8rem;
    overflow-wrap: anywhere;
}

.bc-modal .dl-filename .bi { color: var(--accent-color); }

/* --- Ma'lumotnoma: sarlavha va bo'lim tugmalari --- */
.bc-modal .help-header { flex-wrap: wrap; gap: 12px; }
.bc-modal .help-header .modal-title { margin-right: auto; }
.bc-modal .help-header .btn-close { order: 3; margin: 0; }

.bc-modal .help-tabs {
    order: 2;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bc-surface-2);
}

.bc-modal .help-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-500);
    font-size: .86rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all .25s var(--ease);
}

.bc-modal .help-tabs .nav-link:hover { color: var(--accent-color); }

.bc-modal .help-tabs .nav-link.active {
    background: #fff;
    color: var(--accent-color);
    box-shadow: var(--shadow-xs);
}

.bc-modal .help-tabs .nav-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.bc-modal .help-body { padding: 0 22px 22px; }
.bc-modal #helpHowto { padding-top: 20px; }

/* Qidiruv paneli (yopishqoq) */
.bc-modal .guide-toolbar {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 18px 0 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.bc-modal .guide-search .form-control {
    height: 48px;
    padding-right: 44px;
    border-radius: 14px;
    font-size: 1rem;
}

.bc-modal .guide-search .form-control::-webkit-search-cancel-button { display: none; }

.bc-modal .guide-search-clear {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-500);
    transform: translateY(-50%);
}

.bc-modal .guide-search-clear:hover { background: var(--bc-surface-3); color: var(--ink-900); }
.bc-modal .guide-search-clear.d-none { display: none; }

.bc-modal .guide-count { min-height: 1.2em; padding-top: 8px; color: var(--ink-500); font-size: .78rem; }

.bc-modal .guide-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 4px; }

.bc-modal .guide-chip {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--ink-200);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-700);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s var(--ease);
}

.bc-modal .guide-chip .bi { color: var(--ink-500); }
.bc-modal .guide-chip small { color: var(--ink-500); font-size: .72rem; font-variant-numeric: tabular-nums; }
.bc-modal .guide-chip:hover { border-color: var(--accent-color); color: var(--accent-color); }
.bc-modal .guide-chip:hover .bi { color: var(--accent-color); }

.bc-modal .guide-chip.active {
    border-color: transparent;
    background: var(--grad-accent);
    color: #fff;
    box-shadow: 0 6px 14px rgba(16, 188, 105, .22);
}

.bc-modal .guide-chip.active .bi,
.bc-modal .guide-chip.active small { color: rgba(255, 255, 255, .9); }

.bc-modal .guide-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 44px 12px;
    color: var(--ink-500);
    font-size: .9rem;
    text-align: center;
}

.bc-modal .guide-state.d-none { display: none; }
.bc-modal .guide-state > .bi { font-size: 1.3rem; }

/* Bo'limlar va kartalar */
.bc-modal .guide-section { padding-top: 8px; }

.bc-modal .guide-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 12px;
    font-size: 1.04rem;
    font-weight: 800;
    color: var(--ink-900);
}

.bc-modal .guide-section-title .bi {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-size: .95rem;
}

.bc-modal .guide-section-title small { color: var(--ink-500); font-family: var(--default-font); font-size: .74rem; font-weight: 500; }

.bc-modal .guide-card {
    margin-bottom: 12px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    scroll-margin-top: 124px; /* yopishqoq qidiruv paneli balandligi */
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.bc-modal .guide-card:hover { border-color: rgba(16, 188, 105, .35); box-shadow: var(--shadow-sm); }
.bc-modal .guide-card.flash { animation: bcFlash 1.6s ease; }

@keyframes bcFlash {
    0%, 40% { border-color: var(--accent-color); box-shadow: 0 0 0 4px rgba(16, 188, 105, .22); }
    100%    { box-shadow: 0 0 0 0 transparent; }
}

.bc-modal .guide-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }

.bc-modal .guide-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-size: 1.15rem;
}

.bc-modal .guide-title { flex: 1 1 auto; }

.bc-modal .guide-name {
    margin: 0 0 5px;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--ink-900);
}

.bc-modal .guide-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.bc-modal .guide-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bc-surface-3);
    color: var(--ink-500);
    font-size: .7rem;
    font-weight: 700;
}

.bc-modal .guide-badge.type { background: var(--accent-soft); color: var(--accent-color); }
.bc-modal .guide-badge.off { flex: 0 0 auto; background: var(--bc-warn-soft); color: var(--bc-warn); }
.bc-modal .guide-std { color: var(--ink-500); font-size: .72rem; }
.bc-modal .guide-use { flex: 0 0 auto; white-space: nowrap; }

.bc-modal .guide-facts {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 7px 14px;
    margin: 0;
    font-size: .875rem;
    line-height: 1.6;
}

.bc-modal .guide-facts dt { padding-top: 1px; color: var(--ink-500); font-size: .8rem; font-weight: 700; }
.bc-modal .guide-facts dd { margin: 0; color: var(--ink-700); }

.bc-modal .guide-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 12px 0 0;
    padding: 9px 12px;
    border: 1px solid rgba(217, 119, 6, .2);
    border-radius: var(--radius-sm);
    background: var(--bc-warn-soft);
    color: var(--ink-700);
    font-size: .82rem;
    line-height: 1.55;
}

.bc-modal .guide-note .bi { margin-top: 2px; color: #d97706; }

.bc-modal .guide-also {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 2px 0 10px;
    color: var(--ink-500);
    font-size: .8rem;
}

.bc-modal .guide-link {
    padding: 3px 11px;
    border: 1px dashed rgba(16, 188, 105, .45);
    border-radius: 999px;
    background: transparent;
    color: var(--accent-color);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s var(--ease);
}

.bc-modal .guide-link:hover { border-style: solid; background: var(--accent-soft); }

.bc-modal .guide-terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

.bc-modal .guide-term {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bc-surface-2);
}

.bc-modal .guide-term-title { margin: 0 0 4px; font-size: .92rem; font-weight: 800; color: var(--ink-900); }
.bc-modal .guide-term p { margin: 0; color: var(--ink-700); font-size: .84rem; line-height: 1.55; }

.bc-modal .guide-list mark,
.bc-modal .guide-term mark {
    padding: 0 2px;
    border-radius: 4px;
    background: rgba(250, 204, 21, .45);
    color: inherit;
}

/* --- Qo'llanma --- */
.bc-modal .help-steps { margin: 0; padding: 0; list-style: none; }

.bc-modal .help-steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
    color: var(--ink-700);
    font-size: .92rem;
    line-height: 1.6;
}

.bc-modal .help-steps strong { color: var(--ink-900); }
.bc-modal .help-steps .bi { color: var(--accent-color); }

.bc-modal .step-num {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-top: -2px;
    border-radius: 50%;
    background: var(--grad-accent);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(16, 188, 105, .25);
}

.bc-modal .help-subtitle { margin: 26px 0 12px; font-size: 1rem; font-weight: 800; color: var(--ink-900); }

.bc-modal .help-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }

.bc-modal .help-cat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bc-surface-2);
}

.bc-modal .help-cat div { display: flex; flex-direction: column; line-height: 1.3; }
.bc-modal .help-cat strong { color: var(--ink-900); font-size: .86rem; }
.bc-modal .help-cat span:not(.cat-icon) { color: var(--ink-500); font-size: .74rem; }

.bc-modal .help-tips { margin: 0; padding-left: 20px; color: var(--ink-700); font-size: .88rem; line-height: 1.6; }
.bc-modal .help-tips li { margin-bottom: 6px; }
.bc-modal .help-tips li::marker { color: var(--accent-color); }
.bc-modal .help-tips .bi { color: var(--accent-color); }
.bc-modal .help-engine { margin: 16px 0 0; color: var(--ink-500); font-size: .78rem; }

/* ==================================================================
   10. BILDIRISHNOMALAR (toast)
   ================================================================== */

.bc-toasts.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(380px, calc(100vw - 40px));
}

.bc-toasts.toast-container > :not(:last-child) { margin-bottom: 0; }

.bc-toasts .bc-toast {
    --bs-toast-max-width: 380px;
    --bs-toast-bg: #fff;
    --bs-toast-border-color: var(--line);
    --bs-toast-border-radius: var(--radius-sm);
    --bs-toast-box-shadow: var(--shadow-md);
    --bs-toast-font-size: .89rem;
    border-left: 4px solid var(--accent-color);
    color: var(--ink-700);
}

.bc-toasts .bc-toast .toast-body {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    line-height: 1.5;
}

.bc-toasts .bc-toast .toast-body .bi { flex: 0 0 auto; font-size: 1.1rem; color: var(--accent-color); }
.bc-toasts .bc-toast .btn-close { flex: 0 0 auto; font-size: .7rem; }

.bc-toasts .bc-toast.is-error { border-left-color: var(--bc-danger); }
.bc-toasts .bc-toast.is-error .toast-body .bi { color: var(--bc-danger); }
.bc-toasts .bc-toast.is-warn { border-left-color: #d97706; }
.bc-toasts .bc-toast.is-warn .toast-body .bi { color: #d97706; }
.bc-toasts .bc-toast.is-info { border-left-color: var(--accent-2); }
.bc-toasts .bc-toast.is-info .toast-body .bi { color: var(--accent-2); }

/* Oyna yoki yon panel ochiq paytda saytning "yuqoriga" tugmasi ustiga chiqmasin */
body.modal-open .scroll-top,
body:has(.bc-scope.offcanvas.show) .scroll-top,
body:has(.bc-types-offcanvas.show) .scroll-top {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ==================================================================
   11. RESPONSIVE
   ================================================================== */

@media (max-width: 991.98px) {
    .bc-modal .help-tabs { order: 4; width: 100%; overflow-x: auto; }
    .bc-modal .help-tabs .nav-item { flex: 1 0 auto; }
    .bc-modal .help-tabs .nav-link { width: 100%; }
}

@media (max-width: 767.98px) {
    #bcApp .bc-sticky { position: static; }
    #bcApp .preview-wrap { min-height: 220px; padding: 18px; }
    #bcApp .form-actions .btn { flex: 1 1 calc(50% - 10px); }
    #bcApp .form-actions .btn-primary { flex-basis: 100%; margin-left: 0 !important; }

    .bc-modal .guide-chips {
        flex-wrap: nowrap;
        margin-right: -16px;
        padding-right: 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .bc-modal .guide-chips::-webkit-scrollbar { display: none; }
}

@media (max-width: 575.98px) {
    #bcApp .bc-toolbar { padding: 12px; }
    #bcApp .bc-stats { width: 100%; }
    #bcApp .bc-toolbar-actions { width: 100%; }
    #bcApp .bc-tbtn { flex: 1 1 0; padding: 9px 10px; }

    .bc-scope .bc-card-head { padding: 14px 16px; }
    .bc-scope .bc-card-body { padding: 16px; }
    #bcApp .fmt-name { font-size: 1.18rem; }
    #bcApp .result-actions { grid-template-columns: 1fr; }

    .bc-modal .modal-header,
    .bc-modal .modal-body,
    .bc-modal .modal-footer { padding-left: 16px; padding-right: 16px; }
    .bc-modal .help-body { padding: 0 16px 16px; }
    .bc-modal .guide-facts { grid-template-columns: 1fr; gap: 2px; }
    .bc-modal .guide-facts dd { margin-bottom: 8px; }
    .bc-modal .guide-head { flex-wrap: wrap; }
    .bc-modal .guide-use { order: 3; width: 100%; }
    .bc-modal .guide-terms { grid-template-columns: 1fr; }
    .bc-modal .help-cats { grid-template-columns: 1fr; }

    .bc-toasts.toast-container { top: auto; right: 16px; bottom: 20px; left: 16px; max-width: none; }
    .bc-toasts .bc-toast { --bs-toast-max-width: 100%; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .bc-scope *,
    .bc-scope *::before,
    .bc-scope *::after { animation: none !important; transition: none !important; }
}
