/* components.css — docs/DESIGN-shadcn-ui.md §4 (shadcn/ui new-york-v4 ko'rinishi, qo'lda CSS)
 *
 * Yangi shadcn-nomli klasslar + ESKI klasslar (mavjud JS shablonlari ishlashi uchun) bir xil ko'rinishga xaritalangan.
 * Manba: shadcn/ui tsx class ro'yxatlari -> CSS qiymatlari (rounded-md = --radius-md, h-9 = 2.25rem, shadow-xs = --shadow-xs, ring-[3px] = --ring-glow).
 * Bo'limlar:  0 komponent tokenlari  1 ikonlar/yordamchi  2 tugmalar  3 forma  4 karta  5 KPI (section-cards)  6 badge
 *             7 jadval + pager  8 tabs + toggle-group  9 dialog  10 toast  11 dropdown/tooltip  12 holatlar (empty/banner/progress/...)
 *             13 layout yordamchilari  14 mamlakat belgilari
 * DIQQAT: var(--muted) — FON, var(--muted-foreground) — matn (eski --muted matn rangi edi).
 */

/* ============================== 0. Komponent tokenlari (light/dark farqlari shu yerda) ============================== */
:root {
  --field-bg: transparent;                    /* input/select/textarea foni (dark: input/30) */
  --field-bg-hover: transparent;
  --outline-bg: var(--background);            /* .btn (outline) foni */
  --outline-bg-hover: var(--accent);
  --outline-border: var(--border);
  --ghost-bg-hover: var(--accent);
  --destructive-solid: var(--destructive);    /* .btn-destructive / .badge-destructive foni */
  --destructive-solid-hover: color-mix(in oklab, var(--destructive) 90%, transparent);
  --destructive-solid-fg: #fff;
  --tab-active-bg: var(--background);
  --tab-active-border: transparent;
  --tab-inactive-fg: var(--muted-foreground-strong);
  --check-bg-unchecked: transparent;
  /* select chevron (lucide chevron-down) va checkbox belgisi — tema bo'yicha rang (data-URI'da var() ishlamaydi) */
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
:root.dark, .dark {
  --field-bg: color-mix(in oklab, var(--input) 30%, transparent);
  --field-bg-hover: color-mix(in oklab, var(--input) 50%, transparent);
  --outline-bg: color-mix(in oklab, var(--input) 30%, transparent);
  --outline-bg-hover: color-mix(in oklab, var(--input) 50%, transparent);
  --outline-border: var(--input);
  --ghost-bg-hover: color-mix(in oklab, var(--accent) 50%, transparent);
  --destructive-solid: color-mix(in oklab, var(--destructive) 60%, transparent);
  --destructive-solid-hover: color-mix(in oklab, var(--destructive) 75%, transparent);
  --tab-active-bg: color-mix(in oklab, var(--input) 30%, transparent);
  --tab-active-border: var(--input);
  --tab-inactive-fg: var(--muted-foreground);
  --check-bg-unchecked: color-mix(in oklab, var(--input) 30%, transparent);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* ============================== 1. Ikonlar va umumiy yordamchilar ============================== */
/* js/icons.js: icon(name, cls) -> inline SVG (currentColor). O'lcham shu yerda. */
.icon { width: 1rem; height: 1rem; flex-shrink: 0; pointer-events: none; vertical-align: -0.15em; }
.icon-xs { width: 0.75rem; height: 0.75rem; }
.icon-sm { width: 0.875rem; height: 0.875rem; }
.icon-lg { width: 1.25rem; height: 1.25rem; }
.icon-xl { width: 1.5rem; height: 1.5rem; }

.muted { color: var(--muted-foreground); }
.text-foreground { color: var(--foreground); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-destructive { color: var(--destructive-text); }
.text-info { color: var(--info); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row-flex { display: flex; align-items: center; gap: 0.5rem; }

/* Ajratgich (Separator) */
.separator { flex-shrink: 0; height: 1px; width: 100%; background: var(--border); border: 0; margin: 0; }
.separator-v, .separator[data-orientation="vertical"] { height: 1rem; width: 1px; align-self: center; }

/* Klaviatura belgisi (Kbd) */
.kbd {
  pointer-events: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem;
  height: 1.25rem; min-width: 1.25rem; width: fit-content; padding: 0 0.25rem;
  border-radius: var(--radius-sm); background: var(--muted); color: var(--muted-foreground-strong);
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 500; user-select: none;
}

/* Skeleton */
.skeleton { border-radius: var(--radius-md); background: var(--accent); animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes skeleton-pulse { 50% { opacity: 0.5; } }

/* Spinner (Loader2 o'rniga aylanuvchi halqa) */
.spinner {
  display: inline-block; flex-shrink: 0; width: 1rem; height: 1rem; vertical-align: -0.2em;
  border: 2px solid color-mix(in oklab, var(--muted-foreground) 30%, transparent);
  border-top-color: var(--foreground); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================== 2. Tugmalar (button.tsx) ============================== */
/* Yolg'iz `.btn` = outline. Variantlar: .btn-default/.btn-primary, .btn-outline, .btn-secondary, .btn-ghost, .btn-destructive/.btn-danger, .btn-link.
   O'lchamlar: .btn-xs .btn-sm (default) .btn-lg .btn-icon .btn-icon-xs .btn-icon-sm .btn-icon-lg */
.btn {
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.25rem; padding: 0.5rem 1rem; border: 1px solid var(--outline-border); border-radius: var(--radius-md);
  background-color: var(--outline-bg); color: var(--foreground); box-shadow: var(--shadow-xs);
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500; line-height: 1.25rem; white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none; outline: none;
  transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast), opacity var(--duration-fast);
}
.btn:has(> svg) { padding-inline: 0.75rem; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; pointer-events: none; }
.btn:hover { background-color: var(--outline-bg-hover); color: var(--accent-foreground); text-decoration: none; }
.btn:active { background-color: var(--accent); }
.btn:focus-visible { outline: none; border-color: var(--focus-border); box-shadow: var(--ring-glow), var(--shadow-xs); }
.btn:disabled, .btn[aria-disabled="true"], .btn.disabled { pointer-events: none; opacity: 0.5; }
.btn[aria-invalid="true"] { border-color: var(--destructive); box-shadow: var(--ring-glow-destructive); }
.btn.active, .btn[aria-pressed="true"] { background-color: var(--accent); color: var(--accent-foreground); }

.btn-default, .btn-primary {
  background-color: var(--primary); border-color: transparent; color: var(--primary-foreground); box-shadow: none;
}
.btn-default:hover, .btn-primary:hover { background-color: color-mix(in oklab, var(--primary) 90%, transparent); color: var(--primary-foreground); }
.btn-default:active, .btn-primary:active { background-color: color-mix(in oklab, var(--primary) 80%, transparent); }
.btn-default:focus-visible, .btn-primary:focus-visible { box-shadow: var(--ring-glow); }
.btn-primary.active, .btn-primary[aria-pressed="true"] { background-color: var(--primary); color: var(--primary-foreground); }

.btn-outline { /* = .btn (aniq nom) */ }

.btn-secondary { background-color: var(--secondary); border-color: transparent; color: var(--secondary-foreground); box-shadow: none; }
.btn-secondary:hover { background-color: color-mix(in oklab, var(--secondary) 80%, transparent); color: var(--secondary-foreground); }
.btn-secondary:active { background-color: color-mix(in oklab, var(--secondary) 65%, transparent); }
.btn-secondary:focus-visible { box-shadow: var(--ring-glow); }

.btn-ghost { background-color: transparent; border-color: transparent; color: var(--foreground); box-shadow: none; }
.btn-ghost:hover { background-color: var(--ghost-bg-hover); color: var(--accent-foreground); }
.btn-ghost:active { background-color: var(--accent); }
.btn-ghost:focus-visible { box-shadow: var(--ring-glow); }

.btn-destructive, .btn-danger {
  background-color: var(--destructive-solid); border-color: transparent; color: var(--destructive-solid-fg); box-shadow: none;
}
.btn-destructive:hover, .btn-danger:hover { background-color: var(--destructive-solid-hover); color: var(--destructive-solid-fg); }
.btn-destructive:active, .btn-danger:active { background-color: var(--destructive-solid-hover); filter: brightness(0.95); }
.btn-destructive:focus-visible, .btn-danger:focus-visible { border-color: var(--destructive); box-shadow: var(--ring-glow-destructive); }

.btn-link { background-color: transparent; border-color: transparent; color: var(--primary); box-shadow: none; text-underline-offset: 4px; }
.btn-link:hover { background-color: transparent; color: var(--primary); text-decoration: underline; }
.btn-link:active { background-color: transparent; }
.btn-link:focus-visible { box-shadow: var(--ring-glow); }

/* O'lchamlar */
.btn-xs { height: 1.5rem; gap: 0.25rem; padding: 0 0.5rem; font-size: 0.75rem; }
.btn-xs:has(> svg) { padding-inline: 0.375rem; }
.btn-xs svg { width: 0.75rem; height: 0.75rem; }
.btn-sm { height: 2rem; gap: 0.375rem; padding: 0 0.75rem; }
.btn-sm:has(> svg) { padding-inline: 0.625rem; }
.btn-lg { height: 2.5rem; padding: 0 1.5rem; }
.btn-lg:has(> svg) { padding-inline: 1rem; }
.btn-icon, .btn-icon-xs, .btn-icon-sm, .btn-icon-lg { width: 2.25rem; padding: 0; }
.btn-icon-xs { width: 1.5rem; height: 1.5rem; }
.btn-icon-xs svg { width: 0.75rem; height: 0.75rem; }
.btn-icon-sm { width: 2rem; height: 2rem; }
.btn-icon-lg { width: 2.5rem; height: 2.5rem; }
.btn-icon:has(> svg), .btn-icon-xs:has(> svg), .btn-icon-sm:has(> svg), .btn-icon-lg:has(> svg) { padding: 0; }
.btn-block { width: 100%; }

/* Eski .icon-btn = ghost icon tugma */
.icon-btn {
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; padding: 0; border: 1px solid transparent; border-radius: var(--radius-md);
  background: transparent; color: var(--muted-foreground); cursor: pointer; outline: none;
  transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.icon-btn svg { width: 1rem; height: 1rem; pointer-events: none; }
.icon-btn:hover { background: var(--ghost-bg-hover); color: var(--accent-foreground); }
.icon-btn:active { background: var(--accent); }
.icon-btn:focus-visible { border-color: var(--focus-border); box-shadow: var(--ring-glow); }
.icon-btn:disabled { pointer-events: none; opacity: 0.5; }
.icon-btn-danger:hover { background: var(--destructive-muted); color: var(--destructive-text); }

/* ============================== 3. Forma elementlari (input.tsx, select.tsx, textarea, checkbox.tsx, label.tsx) ============================== */
/* Past o'ziga xoslik (:where) — sahifa CSS'i (.mc-input, .map-controls select ...) osongina qayta belgilaydi. */
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"], [type="button"], [type="submit"], [type="reset"], [type="image"]), select, textarea),
.input {
  display: inline-block; height: 2.25rem; min-width: 0; padding: 0.25rem 0.75rem;
  border: 1px solid var(--input); border-radius: var(--radius-md); background-color: var(--field-bg); color: var(--foreground);
  box-shadow: var(--shadow-xs); font-family: var(--font-sans); font-size: 0.875rem; line-height: 1.25rem; outline: none;
  transition: color var(--duration-fast), box-shadow var(--duration-fast), border-color var(--duration-fast), background-color var(--duration-fast);
}
.input { width: 100%; }
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"], [type="button"], [type="submit"], [type="reset"], [type="image"]), select, textarea):hover,
.input:hover { border-color: color-mix(in oklab, var(--input) 60%, var(--foreground)); }
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"], [type="button"], [type="submit"], [type="reset"], [type="image"]), select, textarea):focus-visible,
.input:focus-visible { border-color: var(--focus-border); box-shadow: var(--ring-glow), var(--shadow-xs); outline: none; }
:where(input, select, textarea):disabled, .input:disabled { pointer-events: none; cursor: not-allowed; opacity: 0.5; }
:where(input, select, textarea)[aria-invalid="true"], .input[aria-invalid="true"] { border-color: var(--destructive); box-shadow: var(--ring-glow-destructive); }
:where(input)::selection, :where(textarea)::selection { background: var(--primary); color: var(--primary-foreground); }
:where(input[type="number"]) { width: 5.75rem; }
:where(input[type="date"], input[type="month"], input[type="time"])::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; }
:where(input[type="date"], input[type="month"], input[type="time"])::-webkit-calendar-picker-indicator:hover { opacity: 1; }
:where(input[type="search"])::-webkit-search-cancel-button { cursor: pointer; }

/* O'lcham variantlari (select size="sm" -> h-8) */
.input-sm, .select-sm, .lang-switch { height: 2rem; padding-block: 0.125rem; }
.input-lg { height: 2.5rem; }

/* Textarea */
:where(textarea) { height: auto; min-height: 4rem; padding: 0.5rem 0.75rem; line-height: 1.4; }

/* Select: native <select>, chevron fon-rasm (ikkala temada) */
:where(select), select.input {
  -webkit-appearance: none; appearance: none; width: auto; padding-right: 2rem; cursor: pointer;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 0.625rem center; background-size: 1rem 1rem;
}
:where(select):hover { background-color: var(--field-bg-hover); }
:where(select[multiple], select[size]:not([size="1"])) { height: auto; padding-right: 0.75rem; background-image: none; }
:where(select) option, :where(select) optgroup { background-color: var(--popover); color: var(--popover-foreground); }
.form-row select, .form-row input:not([type="checkbox"], [type="radio"]), .form-row textarea { width: 100%; }

/* Fayl tanlash */
:where(input[type="file"]) {
  width: 100%; min-width: 0; padding: 0.3125rem 0.75rem 0.25rem; border: 1px solid var(--input); border-radius: var(--radius-md);
  background: var(--field-bg); box-shadow: var(--shadow-xs); font-size: 0.875rem; cursor: pointer;
}
:where(input[type="file"])::file-selector-button {
  margin: -0.125rem 0.75rem -0.0625rem -0.25rem; height: 1.75rem; padding: 0 0.625rem; border: 0; border-radius: var(--radius-sm);
  background: var(--secondary); color: var(--secondary-foreground); font: inherit; font-weight: 500; cursor: pointer;
}
:where(input[type="range"]) { accent-color: var(--primary); width: 100%; }
:where(input[type="color"]) { width: 2.25rem; height: 2.25rem; padding: 2px; border: 1px solid var(--input); border-radius: var(--radius-md); background: var(--field-bg); cursor: pointer; }

/* Checkbox / radio: 16px, border-input, shadow-xs; belgilangan = primary */
:where(input[type="checkbox"], input[type="radio"]) {
  -webkit-appearance: none; appearance: none; position: relative; flex-shrink: 0; width: 1rem; height: 1rem; margin: 0;
  border: 1px solid var(--input); background-color: var(--check-bg-unchecked); background-repeat: no-repeat; background-position: center; background-size: 0.875rem;
  box-shadow: var(--shadow-xs); cursor: pointer; vertical-align: -0.2em; outline: none;
  transition: box-shadow var(--duration-fast), border-color var(--duration-fast), background-color var(--duration-fast);
}
:where(input[type="checkbox"]) { border-radius: 4px; }
:where(input[type="radio"]) { border-radius: 50%; }
:where(input[type="checkbox"]:checked) { border-color: var(--primary); background-color: var(--primary); background-image: var(--check); }
:where(input[type="checkbox"]:indeterminate) {
  border-color: var(--primary); background-color: var(--primary);
  background-image: linear-gradient(var(--primary-foreground), var(--primary-foreground)); background-size: 0.5rem 2px;
}
:where(input[type="radio"]:checked) {
  border-color: var(--primary);
  background-image: radial-gradient(circle at center, var(--primary) 0 3px, transparent 3.5px); background-size: 100% 100%;
}
:where(input[type="checkbox"], input[type="radio"]):hover { border-color: color-mix(in oklab, var(--input) 60%, var(--foreground)); }
:where(input[type="checkbox"]:checked, input[type="radio"]:checked):hover { border-color: var(--primary); }
:where(input[type="checkbox"], input[type="radio"]):focus-visible { border-color: var(--focus-border); box-shadow: var(--ring-glow), var(--shadow-xs); outline: none; }
:where(input[type="checkbox"], input[type="radio"]):disabled { cursor: not-allowed; opacity: 0.5; pointer-events: none; }

/* Label */
label { font-size: 0.875rem; font-weight: 500; line-height: 1.25; color: var(--foreground); user-select: none; }
:where(label:has(> input[type="checkbox"], > input[type="radio"])) { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
:where(label:has(> input:disabled)) { cursor: not-allowed; opacity: 0.5; }
.form-row { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.form-row > label { display: flex; align-items: center; gap: 0.5rem; line-height: 1; }
.form-cols { display: flex; gap: 1rem; }
.form-cols .form-row { flex: 1; min-width: 0; }
.form-hint { color: var(--muted-foreground); font-size: 0.8125rem; line-height: 1.4; }
.form-err { color: var(--destructive-text); margin: -0.25rem 0 0.75rem; line-height: 1.4; font-size: 0.8125rem; }

/* Filtr paneli */
.filter-bar { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.filter-item { display: flex; flex-direction: column; gap: 0.5rem; }
.filter-item > label { line-height: 1; }
.filter-item .pair { display: flex; align-items: center; gap: 0.375rem; min-width: 0; }
.filter-item .pair input { flex: 1 1 0; min-width: 0; width: auto; }
.filter-item .pair input[type="date"] { padding-inline: 0.5rem; }
.filter-item.grow { flex: 1; min-width: 12rem; }
.filter-item.grow input { width: 100%; }

/* Belgi-qatorlar (checkbox + matn) */
.chk-inline, .row-check, .sp-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; min-height: 2rem;
  font-size: 0.875rem; font-weight: 500; color: var(--foreground);
}

/* ============================== 4. Karta (card.tsx) ============================== */
/* rounded-xl border bg-card py-6 text-card-foreground shadow-sm; ichki kontent px-6 (padding'ni karta o'zi beradi: eski
   "to'g'ridan-to'g'ri bola" shablonlari ham to'g'ri chiziladi). Bo'shliq gap-6. */
.card {
  display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; flex-shrink: 0;
  padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--card); color: var(--card-foreground); box-shadow: var(--shadow-sm);
}
.card-header, .card-head { min-width: 0; }
.card-header {
  display: grid; grid-auto-rows: min-content; align-items: start; gap: 0.5rem;
}
.card-header:has(> .card-action) { grid-template-columns: 1fr auto; }
.card-action { grid-column: 2; grid-row: 1 / span 2; align-self: start; justify-self: end; display: flex; align-items: center; gap: 0.5rem; }
/* Eski .card-head: sarlavha chapda, boshqaruvlar o'ngda (flex) */
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem; }
.card-head h2, .card-head h3, .card-title { font-size: 1rem; font-weight: 600; line-height: 1; margin: 0; color: var(--card-foreground); }
.card-description, .card-cap { font-size: 0.875rem; line-height: 1.4; color: var(--muted-foreground); }
.card > h2, .card > h3, .card > h4 { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.1; color: var(--card-foreground); }   /* eski: karta sarlavhasi to'g'ridan-to'g'ri h4 */
.card-head + .card-cap, .card > :is(h2, h3, h4) + .card-cap { margin-top: -1rem; }   /* eski: sarlavha ostidagi izoh sarlavhaga yaqin */
.card-cap:has(+ *) { margin-bottom: -0.5rem; }
.card-content { min-width: 0; }
.card-footer { display: flex; align-items: center; gap: 0.5rem; }
.card-footer.border-t, .card-header.border-b { border-color: var(--border); }
.card-flush { padding: 0; gap: 0; overflow: hidden; }     /* jadval/xarita kartalar uchun: ichki padding'siz */
.card-flush > .card-header { padding: 1.5rem 1.5rem 1rem; }
.sec-head { margin: 0.375rem 0 0.625rem; }
.sec-head h3 { font-size: 0.875rem; font-weight: 600; margin: 0 0 0.125rem; }
.sec-cap { font-size: 0.75rem; color: var(--muted-foreground); line-height: 1.4; }

/* ============================== 5. KPI kartalar — section-cards ============================== */
/* dashboard-01: grid gap-4, konteyner so'rovlari: 1 ustun -> @xl(36rem) 2 -> 4 (shadcn @5xl=64rem; bu yerda 56rem: #page konteynerining
   content-box'i padding hisobiga ~48px tor, 1280px laptopda ham 4 ustun chiqishi uchun). Konteyner = #page (container: main). */
#page { container: main / inline-size; }
.kpi-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@container main (min-width: 36rem) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container main (min-width: 56rem) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.kpi-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.5rem; align-content: start; min-width: 0;
  padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-xl);
  color: var(--card-foreground); background-color: var(--card);
  background-image: linear-gradient(to top, color-mix(in oklab, var(--primary) 5%, transparent), var(--card));
  box-shadow: var(--shadow-xs);
}
/* Dark'da ham gradient qoladi (shadcn: `dark:...:bg-card` faqat background-color'ni qayta belgilaydi, gradient rasm saqlanadi) */
.kpi-label { grid-column: 1; grid-row: 1; font-size: 0.875rem; line-height: 1.4; color: var(--muted-foreground); }
.kpi-value { grid-column: 1; grid-row: 2; font-size: 1.875rem; font-weight: 600; line-height: 1.15; color: var(--card-foreground); font-variant-numeric: tabular-nums; }
/* shadcn `@[250px]/card:text-3xl`. Karta konteyneri (container-type) subgrid bilan mos emas (layout containment subgridni o'chiradi),
   shuning uchun 4 ustunli setkaning tor oralig'ida (#page 56-65.5rem, ya'ni karta < 250px) qiymat shrifti kichraytiriladi. */
@container main (min-width: 56rem) and (max-width: 65.5rem) { .kpi-grid:not(.adm-kpi-3) .kpi-value { font-size: 1.5rem; } }
.kpi-badge {
  grid-column: 2; grid-row: 1 / span 2; align-self: start; justify-self: end;
  display: inline-flex; align-items: center; gap: 0.25rem; width: fit-content; padding: 0.125rem 0.5rem;
  border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--foreground);
  font-size: 0.75rem; font-weight: 500; line-height: 1rem; white-space: nowrap;
}
.kpi-badge svg { width: 0.75rem; height: 0.75rem; flex-shrink: 0; }
.kpi-foot { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; margin-top: 1rem; font-size: 0.875rem; line-height: 1.3; }
.kpi-foot strong, .kpi-foot > :first-child:not(:only-child) { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; color: var(--card-foreground); }
.kpi-foot > :not(:first-child) { color: var(--muted-foreground); }
.kpi-foot svg { width: 1rem; height: 1rem; flex-shrink: 0; }
/* Eski shablon: .kpi-sub (bitta qator, muted) */
.kpi-sub { grid-column: 1 / -1; margin-top: 0.75rem; font-size: 0.8125rem; line-height: 1.3; color: var(--muted-foreground); }
/* Bir qatordagi kartalarning yorliq / qiymat / izoh satrlari subgrid bilan tekislanadi: badge tufayli yorliq (ayniqsa ru) ikki qatorga
   o'ralsa ham qiymatlar bir chiziqda turadi. Sayt dashboardi (#sd-month/#sd-kpi) o'z aniq qator shabloniga ega — unga tegilmaydi. */
@supports (grid-template-rows: subgrid) {
  .kpi-grid:not(#sd-month, #sd-kpi) > .kpi-card { grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .kpi-grid:not(#sd-month, #sd-kpi) > .kpi-card > .kpi-value { margin-top: 0.5rem; }
}

/* Ko'rsatkich ma'nosini tushuntiruvchi "?" belgisi (title yoki data-tip) */
.info-dot {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1rem; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--muted-foreground);
  font-size: 0.625rem; font-weight: 600; line-height: 1; cursor: help; vertical-align: 0.05em;
  transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
}
.info-dot:hover, .info-dot:focus-visible { background: var(--accent); color: var(--accent-foreground); border-color: var(--input); }

/* ============================== 6. Badge (badge.tsx) ============================== */
/* Yolg'iz `.badge` = secondary (eski jimjit belgi o'rnida). Variantlar: .badge-default (primary), -secondary, -outline, -destructive,
   -ghost, -link, -success, -warning, -info, -purple. */
.badge {
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 0.25rem; width: fit-content; max-width: 100%;
  overflow: hidden; padding: 0.125rem 0.5rem; border: 1px solid transparent; border-radius: 999px;
  background-color: var(--secondary); color: var(--secondary-foreground);
  font-size: 0.75rem; font-weight: 500; line-height: 1rem; white-space: nowrap;
  transition: color var(--duration-fast), background-color var(--duration-fast), box-shadow var(--duration-fast);
}
.badge > svg { width: 0.75rem; height: 0.75rem; pointer-events: none; flex-shrink: 0; }
a.badge:hover { background-color: color-mix(in oklab, var(--secondary) 80%, transparent); text-decoration: none; }
.badge:focus-visible { border-color: var(--focus-border); box-shadow: var(--ring-glow); outline: none; }
.badge-default { background-color: var(--primary); color: var(--primary-foreground); }
a.badge-default:hover { background-color: color-mix(in oklab, var(--primary) 90%, transparent); }
.badge-secondary { background-color: var(--secondary); color: var(--secondary-foreground); }
.badge-outline, .kpi-badge.badge-outline { background-color: transparent; border-color: var(--border); color: var(--foreground); }
a.badge-outline:hover { background-color: var(--accent); color: var(--accent-foreground); }
.badge-destructive { background-color: var(--destructive-solid); color: var(--destructive-solid-fg); }
.badge-ghost { background-color: transparent; }
a.badge-ghost:hover { background-color: var(--accent); color: var(--accent-foreground); }
.badge-link { background-color: transparent; color: var(--primary); }
a.badge-link:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Tinted (semantik) — 10-15% fon + rang matn; fon rasm sifatida, shuning uchun rasm ustida ham (background-color qo'yilsa) o'qiladi */
.badge-success, .badge-warning, .badge-info, .badge-purple, .badge-danger, .badge-private, .badge-public,
.badge-billboard, .badge-dooh, .badge-other, .country-tag, .sample-tag { background-color: transparent; }
.badge-success, .badge-public { color: var(--success); background-image: linear-gradient(var(--success-muted), var(--success-muted)); }
.badge-warning, .badge-other, .sample-tag { color: var(--warning); background-image: linear-gradient(var(--warning-muted), var(--warning-muted)); }
.badge-info, .badge-billboard, .country-tag { color: var(--info); background-image: linear-gradient(var(--info-muted), var(--info-muted)); }
.badge-purple, .badge-dooh { color: var(--purple); background-image: linear-gradient(var(--purple-muted), var(--purple-muted)); }
.badge-danger, .badge-private { color: var(--destructive-text); background-image: linear-gradient(var(--destructive-muted), var(--destructive-muted)); }
.badge-type { font-weight: 600; border: 0; }                 /* eski: sayt turi belgisi */
.country-tag, .sample-tag { font-weight: 600; letter-spacing: 0.02em; }
/* KPI trend badge: ton berilsa (success/warning/info/destructive) — yumshoq tinted ko'rinish, chegarasiz */
.kpi-badge.badge-success, .kpi-badge.badge-warning, .kpi-badge.badge-info, .kpi-badge.badge-destructive { border-color: transparent; }
.kpi-badge.badge-destructive { background-color: transparent; color: var(--destructive-text); background-image: linear-gradient(var(--destructive-muted), var(--destructive-muted)); }
/* Trend (KPI badge) ranglari */
.kpi-badge.up, .badge.up { color: var(--success); }
.kpi-badge.down, .badge.down { color: var(--destructive-text); }

/* Chip (yorliq: matn + qalin qiymat) va son belgisi */
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.625rem; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--muted-foreground); font-size: 0.75rem; line-height: 1rem; white-space: nowrap;
}
.chip b { color: var(--foreground); font-weight: 600; }
.pill-n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 0.375rem; border-radius: 999px;
  background: var(--primary); color: var(--primary-foreground); font-size: 0.6875rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
}
.pill-n:empty { display: none; }
.btn-default .pill-n, .btn-primary .pill-n { background: var(--primary-foreground); color: var(--primary); }

/* ============================== 7. Jadval (table.tsx + dashboard-01 data-table) + pager ============================== */
.table-wrap { position: relative; width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.table-scroll { max-height: 26rem; }
.table-wrap table { margin: 0; }
table { font-size: 0.875rem; caption-side: bottom; }
th {
  height: 2.5rem; padding: 0 0.5rem; text-align: left; vertical-align: middle; white-space: nowrap;
  font-weight: 500; color: var(--foreground); background: var(--muted); box-shadow: inset 0 -1px 0 var(--border);
}
.table-wrap thead th { position: sticky; top: 0; z-index: 1; }
td { padding: 0.5rem; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0.75rem; }
th:last-child, td:last-child { padding-right: 0.75rem; }
tbody tr, tfoot tr { border-bottom: 1px solid var(--border); transition: background-color var(--duration-fast); }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: color-mix(in oklab, var(--muted) 50%, transparent); }
tbody tr.selected, tbody tr[data-state="selected"] { background: var(--muted); }
tfoot { background: color-mix(in oklab, var(--muted) 50%, transparent); font-weight: 500; border-top: 1px solid var(--border); }
tfoot tr:last-child { border-bottom: 0; }
caption { margin-top: 1rem; font-size: 0.875rem; color: var(--muted-foreground); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
th.sortable { cursor: pointer; user-select: none; transition: background-color var(--duration-fast); }
th.sortable:hover { background: var(--accent); }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: color-mix(in oklab, var(--muted) 70%, transparent); }
td.diag { color: var(--muted-foreground); }
.table-empty td { height: 6rem; text-align: center; color: var(--muted-foreground); }

/* Pager: chapda "N ta" (.pager-info), o'ngda sahifa/tugmalar */
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap; padding: 0.75rem 0.25rem 0; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; font-size: 0.875rem; }
.table-footer .pager { margin-top: 0; }
.pager-info { margin-right: auto; color: var(--muted-foreground); font-size: 0.875rem; }
.pager-page { font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.pager-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem; min-width: 2rem; height: 2rem; padding: 0 0.5rem;
  border: 1px solid var(--outline-border); border-radius: var(--radius-md); background-color: var(--outline-bg); color: var(--foreground);
  box-shadow: var(--shadow-xs); font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; outline: none;
  transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.pager-btn svg { width: 1rem; height: 1rem; }
.pager-btn:hover { background-color: var(--outline-bg-hover); color: var(--accent-foreground); }
.pager-btn:active { background-color: var(--accent); }
.pager-btn:focus-visible { border-color: var(--focus-border); box-shadow: var(--ring-glow), var(--shadow-xs); }
.pager-btn.active, .pager-btn[aria-current="page"] { background-color: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.pager-btn:disabled { pointer-events: none; opacity: 0.5; }
.pager-gap { color: var(--muted-foreground); padding: 0 0.125rem; }

/* ============================== 8. Tabs (tabs.tsx) + toggle-group (toggle-group.tsx) ============================== */
.tabs-list {
  display: inline-flex; align-items: center; justify-content: center; width: fit-content; height: 2.25rem; padding: 3px;
  border-radius: var(--radius-lg); background: var(--muted); color: var(--muted-foreground);
}
.tabs-trigger {
  position: relative; display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 0.375rem;
  height: calc(100% - 1px); padding: 0.25rem 0.5rem; border: 1px solid transparent; border-radius: var(--radius-md);
  color: var(--tab-inactive-fg); font-size: 0.875rem; font-weight: 500; line-height: 1.25rem; white-space: nowrap; cursor: pointer; outline: none;
  transition: color var(--duration-fast), background-color var(--duration-fast), box-shadow var(--duration-fast), border-color var(--duration-fast);
}
.tabs-trigger svg { width: 1rem; height: 1rem; pointer-events: none; flex-shrink: 0; }
.tabs-trigger:hover, .tabs-trigger:active { color: var(--foreground); }
.tabs-trigger:focus-visible { border-color: var(--focus-border); box-shadow: var(--ring-glow); outline: 1px solid var(--focus-border); }
.tabs-trigger:disabled, .tabs-trigger[aria-disabled="true"] { pointer-events: none; opacity: 0.5; }
.tabs-trigger[aria-selected="true"], .tabs-trigger[data-state="active"], .tabs-trigger.active {
  background-color: var(--tab-active-bg); border-color: var(--tab-active-border); color: var(--foreground); box-shadow: var(--shadow-sm);
}
.tabs-trigger .badge { height: 1.25rem; min-width: 1.25rem; padding: 0 0.25rem; background-color: color-mix(in oklab, var(--muted-foreground) 30%, transparent); color: var(--foreground); }
.tabs-list.line, .tabs-list-line { gap: 0.25rem; padding: 3px 0; background: transparent; border-radius: 0; }
.tabs-list.line .tabs-trigger, .tabs-list-line .tabs-trigger { background: transparent; box-shadow: none; }
.tabs-list.line .tabs-trigger::after, .tabs-list-line .tabs-trigger::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--foreground); opacity: 0; transition: opacity var(--duration-fast);
}
.tabs-list.line .tabs-trigger[aria-selected="true"], .tabs-list-line .tabs-trigger[aria-selected="true"] { background: transparent; border-color: transparent; box-shadow: none; }
.tabs-list.line .tabs-trigger[aria-selected="true"]::after, .tabs-list-line .tabs-trigger[aria-selected="true"]::after { opacity: 1; }
.tabs-content { flex: 1; outline: none; }

/* Toggle-group (outline, spacing 0) + eski .seg */
.toggle-group, .seg { display: inline-flex; width: fit-content; align-items: center; border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }
.toggle-item, .seg > button {
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 0.5rem; height: 2.25rem; min-width: 2.25rem; width: auto; padding: 0 0.75rem;
  border: 1px solid var(--outline-border); border-left-width: 0; border-radius: 0; background-color: transparent; color: var(--foreground);
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500; white-space: nowrap; cursor: pointer; outline: none;
  transition: color var(--duration-fast), background-color var(--duration-fast), box-shadow var(--duration-fast), border-color var(--duration-fast);
}
.toggle-item:first-child, .seg > button:first-child { border-left-width: 1px; border-top-left-radius: var(--radius-md); border-bottom-left-radius: var(--radius-md); }
.toggle-item:last-child, .seg > button:last-child { border-top-right-radius: var(--radius-md); border-bottom-right-radius: var(--radius-md); }
.toggle-item svg, .seg > button svg { display: block; width: 1rem; height: 1rem; pointer-events: none; flex-shrink: 0; }
.toggle-item:hover, .seg > button:hover { background-color: var(--accent); color: var(--accent-foreground); }
.toggle-item:focus-visible, .seg > button:focus-visible { position: relative; z-index: 1; border-color: var(--focus-border); box-shadow: var(--ring-glow); }
.toggle-item:active, .seg > button:active { background-color: var(--accent); }
.toggle-item:disabled, .seg > button:disabled { pointer-events: none; opacity: 0.5; }
.toggle-item[aria-pressed="true"], .toggle-item[data-state="on"], .toggle-item.active, .toggle-item[aria-checked="true"],
.seg > button[aria-pressed="true"], .seg > button.active {
  background-color: var(--accent); color: var(--accent-foreground);
}
.toggle-group-sm .toggle-item, .toggle-group.sm .toggle-item, .seg-sm > button { height: 2rem; min-width: 2rem; }
.toggle-group.icon-only .toggle-item, .toggle-group-icon .toggle-item { padding: 0; width: 2.25rem; }
/* Ajratilgan variant (spacing) — har biri alohida tugma */
.toggle-group.spaced { gap: 0.5rem; box-shadow: none; }
.toggle-group.spaced .toggle-item { border-left-width: 1px; border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }

/* ============================== 9. Dialog (dialog.tsx) ============================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: var(--overlay); animation: fade-in var(--duration) ease-out;
}
.modal {
  position: relative; display: flex; flex-direction: column; gap: 1rem; width: 32rem; max-width: 100%; max-height: calc(100vh - 2rem); overflow-y: auto;
  padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--background); color: var(--foreground);
  box-shadow: var(--shadow-lg); animation: dialog-in var(--duration) var(--ease-out);
}
.modal-wide { width: 44rem; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-right: 1.5rem; }
.modal-head h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.1; margin: 0; }
.modal-description { font-size: 0.875rem; color: var(--muted-foreground); }
.modal-x {
  position: absolute; top: 1rem; right: 1rem; display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; padding: 0;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--foreground); font-size: 1.25rem; line-height: 1; opacity: 0.7; cursor: pointer; outline: none;
  transition: opacity var(--duration-fast), box-shadow var(--duration-fast);
}
.modal-x svg { width: 1rem; height: 1rem; pointer-events: none; }
.modal-x:hover { opacity: 1; }
.modal-x:focus-visible { opacity: 1; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--focus-border); }
.modal-body { min-width: 0; }
.modal-actions { display: flex; flex-direction: row; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-in { from { opacity: 0; transform: scale(0.96) translateY(4px); } to { opacity: 1; transform: none; } }

/* Yangiliklar modali (release-banner.js) — CHANGELOG yozuvlari ro'yxati */
.news-entry { padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.news-entry:last-child { padding-bottom: 0; border-bottom: none; }
.news-entry + .news-entry { padding-top: 1rem; }
.news-entry-head { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.5rem; }
.news-entry-date { font-size: 0.8125rem; color: var(--muted-foreground); }
.news-entry-list { margin: 0; padding-left: 1.125rem; display: flex; flex-direction: column; gap: 0.375rem; font-size: 0.875rem; color: var(--foreground); }

/* ============================== 10. Toast (sonner) ============================== */
#toasts {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 300; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem;
  width: 22.25rem; max-width: calc(100vw - 2rem); pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--popover); color: var(--popover-foreground);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.1); font-size: 0.8125rem; line-height: 1.4; animation: toast-in 0.25s var(--ease-out);
}
.dark .toast { box-shadow: 0 4px 12px rgb(0 0 0 / 0.5); }
/* Ikonka (CSS mask; JS'dan alohida ikon qo'shilsa .toast.no-icon) */
.toast::before {
  content: ""; flex-shrink: 0; width: 1rem; height: 1rem; background-color: currentColor;
  -webkit-mask: var(--toast-icon, none) center / contain no-repeat; mask: var(--toast-icon, none) center / contain no-repeat;
  --toast-icon: 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%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
}
.toast.no-icon::before { display: none; }
.toast-msg { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.toast-success::before {
  color: var(--success);
  --toast-icon: 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%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}
.toast-error::before {
  color: var(--destructive);
  --toast-icon: 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='7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2'/%3E%3Cpath d='m15 9-6 6'/%3E%3Cpath d='m9 9 6 6'/%3E%3C/svg%3E");
}
.toast-warning::before {
  color: var(--warning);
  --toast-icon: 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-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}
.toast-info::before { color: var(--info); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================== 11. Dropdown menu, tooltip ============================== */
/* Joylashuv (position/top/right) — chaqiruvchi (shell.css) beradi. */
.dropdown {
  z-index: 50; min-width: 8rem; max-height: 80vh; overflow-x: hidden; overflow-y: auto; padding: 0.25rem;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--popover); color: var(--popover-foreground); box-shadow: var(--shadow-md);
  animation: dropdown-in 0.12s ease-out;
}
.dropdown-label { padding: 0.375rem 0.5rem; font-size: 0.875rem; font-weight: 500; }
.dropdown-item {
  position: relative; display: flex; width: 100%; align-items: center; gap: 0.5rem; padding: 0.375rem 0.5rem; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: inherit; font-size: 0.875rem; line-height: 1.25rem; text-align: left; text-decoration: none; cursor: default; user-select: none; outline: none;
}
.dropdown-item svg { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--muted-foreground); pointer-events: none; }
.dropdown-item:hover, .dropdown-item:focus, .dropdown-item:focus-visible { background: var(--accent); color: var(--accent-foreground); text-decoration: none; }
.dropdown-item:active { background: var(--accent); }
.dropdown-item:disabled, .dropdown-item[aria-disabled="true"] { pointer-events: none; opacity: 0.5; }
.dropdown-item.destructive, .dropdown-item[data-variant="destructive"] { color: var(--destructive-text); }
.dropdown-item.destructive svg, .dropdown-item[data-variant="destructive"] svg { color: var(--destructive-text); }
.dropdown-item.destructive:hover, .dropdown-item.destructive:focus, .dropdown-item[data-variant="destructive"]:hover { background: var(--destructive-muted); color: var(--destructive-text); }
.dropdown-sep { height: 1px; margin: 0.25rem -0.25rem; background: var(--border); border: 0; }
.dropdown-shortcut { margin-left: auto; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--muted-foreground); }
@keyframes dropdown-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* Tooltip: .tooltip (panel) va [data-tip] (CSS-only, .info-dot / .has-tip ustida hover/fokusda) */
.tooltip {
  z-index: 60; width: fit-content; max-width: 18rem; padding: 0.375rem 0.75rem; border-radius: var(--radius-md);
  background: var(--foreground); color: var(--background); font-size: 0.75rem; line-height: 1.35; text-wrap: balance;
}
.info-dot[data-tip], .has-tip[data-tip] { position: relative; }
.info-dot[data-tip]:hover::after, .info-dot[data-tip]:focus-visible::after, .has-tip[data-tip]:hover::after, .has-tip[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; z-index: 60; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 16rem; padding: 0.375rem 0.75rem; border-radius: var(--radius-md); background: var(--foreground); color: var(--background);
  font-size: 0.75rem; font-weight: 400; line-height: 1.35; text-align: left; text-transform: none; letter-spacing: 0; white-space: normal; pointer-events: none; text-wrap: balance;
}

/* ============================== 12. Holatlar: empty, banner, progress, check-list ============================== */
.empty-note {
  display: block; padding: 2rem 1.5rem; border: 1px dashed var(--border); border-radius: var(--radius-lg);
  color: var(--muted-foreground); font-size: 0.875rem; line-height: 1.5; text-align: center;
}
.empty-note .empty-cta, .empty-cta { display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.empty-note .empty-cta .btn { text-decoration: none; }

/* Banner (Alert): standart = ogohlantirish (warning), .banner-info / .banner-destructive */
.banner {
  padding: 0.75rem 1rem; border: 1px solid color-mix(in oklab, var(--warning) 35%, transparent); border-radius: var(--radius-lg);
  background-color: transparent; background-image: linear-gradient(var(--warning-muted), var(--warning-muted));
  color: var(--warning); font-size: 0.875rem; line-height: 1.45;
}
.banner a { color: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.banner-info { border-color: color-mix(in oklab, var(--info) 35%, transparent); background-image: linear-gradient(var(--info-muted), var(--info-muted)); color: var(--info); }
.banner-destructive { border-color: color-mix(in oklab, var(--destructive) 35%, transparent); background-image: linear-gradient(var(--destructive-muted), var(--destructive-muted)); color: var(--destructive-text); }
.banner-success { border-color: color-mix(in oklab, var(--success) 35%, transparent); background-image: linear-gradient(var(--success-muted), var(--success-muted)); color: var(--success); }

/* Progress */
.progress { position: relative; width: 100%; height: 0.5rem; margin: 0.5rem 0; overflow: hidden; border-radius: 999px; background: color-mix(in oklab, var(--primary) 20%, transparent); }
.progress-fill { height: 100%; border-radius: inherit; background: var(--primary); transition: width 0.4s var(--ease-out); }

/* Belgilash ro'yxati (modal ichida) */
.check-list { display: flex; flex-direction: column; gap: 0.125rem; max-height: 16rem; overflow-y: auto; }
.check-list label {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.5rem; border-radius: var(--radius-md);
  color: var(--foreground); font-size: 0.875rem; font-weight: 400; cursor: pointer;
}
.check-list label:hover { background: var(--accent); }

/* ============================== 13. Layout yordamchilari ============================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; min-width: 0; }
@container main (max-width: 56rem) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container main (max-width: 44rem) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.chart { height: 260px; min-width: 0; }
.chart-sm { height: 180px; min-width: 0; }
.kpi-grid, .grid-2, .grid-3, .table-wrap { flex-shrink: 0; }

/* ============================== 14. Mamlakat belgilari (country-pages.css mazmuni) ============================== */
/* .country-tag / .sample-tag — 6-bo'limdagi tinted badge ro'yxatida; shu yerda faqat izohlar */
.sample-note { line-height: 1.45; }
.card-cap.sample-note { color: var(--warning); }

/* ============================== 15. Radius boshqaruvi (js/radius.js) ============================== */
/* "Sayt radiusi" rejim tugmasi + slayder (to'r nuqtalari, tezkor radius yorliqlari, tutqich + qiymat pufagi) + qiymat maydoni.
   Slayder qadamlari serverdagi oldindan hisoblangan to'rga yopishadi. Holat klasslari (.rs-ctl da): .is-auto (sayt radiusi rejimi),
   .has-thumb (tutqich ko'rinadi), .is-drag (sudralmoqda), .is-compact (tor yon panel). --p: tutqich o'rni (0..100), --x: nuqta/yorliq o'rni. */
.rs-ctl { --rs-dur: 240ms; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 0.5rem 0.75rem; width: 100%; }

/* Rejim tugmasi */
.rs-auto {
  display: inline-flex; flex: none; align-items: center; gap: 0.375rem; height: 2rem; padding: 0 0.75rem;
  border: 1px solid var(--outline-border); border-radius: var(--radius-md); background: transparent; color: var(--foreground);
  box-shadow: var(--shadow-xs); font: inherit; font-size: 0.8125rem; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.rs-auto svg { flex: none; width: 0.875rem; height: 0.875rem; color: var(--muted-foreground); transition: color var(--duration-fast); }
.rs-auto:hover { background-color: var(--accent); }
.rs-auto:focus-visible { outline: none; border-color: var(--focus-border); box-shadow: var(--ring-glow); }
.rs-auto[aria-pressed="true"] { border-color: color-mix(in oklab, var(--input) 40%, var(--foreground)); background-color: var(--accent); }
.rs-auto[aria-pressed="true"] svg { color: var(--foreground); }

/* Slayder: tutqich chetga chiqib ketmasligi uchun yon tomondan tutqich yarmicha bo'sh joy */
.rs { --p: 0; flex: 1 1 14rem; min-width: 12rem; padding-inline: 0.5625rem; }
.rs-area { position: relative; height: 2rem; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.rs-area::before { content: ""; position: absolute; inset: 0 -0.5625rem; }            /* chekkalarda ham osongina bosiladi */
.rs-track { position: absolute; inset: 50% 0 auto; height: 0.375rem; transform: translateY(-50%); border-radius: 999px; background: color-mix(in oklab, var(--foreground) 15%, transparent); }
.rs-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 1%); border-radius: inherit; background: var(--primary); transition: width var(--rs-dur) var(--ease-out); }
.rs-dot {
  position: absolute; top: 50%; left: calc(var(--x) * 1%); width: 0.25rem; height: 0.25rem; margin: -0.125rem 0 0 -0.125rem; border-radius: 50%;
  background: color-mix(in oklab, var(--foreground) 45%, transparent); transition: background-color var(--duration);
}
.rs-dot.is-on { background: var(--primary-foreground); }                                /* to'ldirilgan qismdagi nuqtalar "yonadi" */
.rs-thumb {
  position: absolute; top: 50%; left: calc(var(--p) * 1%); width: 1.125rem; height: 1.125rem; margin: -0.5625rem 0 0 -0.5625rem;
  border: 2px solid var(--primary); border-radius: 50%; background: var(--background); box-shadow: var(--shadow-sm); outline: none; cursor: grab;
  transition: left var(--rs-dur) var(--ease-out), box-shadow var(--duration-fast), transform var(--duration-fast), opacity var(--duration);
}
.rs-thumb:hover { box-shadow: var(--shadow-sm), 0 0 0 5px color-mix(in oklab, var(--primary) 14%, transparent); }
.rs-thumb:focus-visible { box-shadow: var(--shadow-sm), var(--ring-glow); }
.rs-ctl.is-drag .rs-thumb { cursor: grabbing; transform: scale(1.12); box-shadow: var(--shadow-md), 0 0 0 6px color-mix(in oklab, var(--primary) 18%, transparent); }
.rs-ctl.is-drag .rs-thumb, .rs-ctl.is-drag .rs-fill { transition: none; }               /* sudralayotganda kechikishsiz ergashadi */
.rs-ctl:not(.has-thumb) .rs-thumb, .rs-ctl:not(.has-thumb) .rs-fill { display: none; }
.rs-ctl.is-auto .rs-fill { opacity: 0.25; }                                              /* sayt radiusi rejimi: saytniki xira ko'rsatiladi */
.rs-ctl.is-auto .rs-thumb { border-color: var(--muted-foreground); opacity: 0.75; }
.rs-ref {                                                                                 /* saytning saqlangan radiusi belgisi (tutqich tepasida) */
  position: absolute; top: 50%; left: calc(var(--x) * 1%); width: 0; height: 0; margin: -1.1875rem 0 0 -0.3125rem;
  border: 0.3125rem solid transparent; border-top-color: var(--muted-foreground); cursor: help;
}
.rs-ref[hidden] { display: none; }

/* Qiymat pufagi: tutqich ustida (sudrash / fokus / hover paytida) */
.rs-bubble {
  position: absolute; bottom: calc(100% + 0.5rem); left: 50%; padding: 0.125rem 0.4375rem; border-radius: 0.375rem;
  background: var(--primary); color: var(--primary-foreground); font-size: 0.6875rem; font-weight: 600; line-height: 1.25;
  font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, 0.25rem);
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}
.rs-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -0.25rem; border: 0.25rem solid transparent; border-top-color: var(--primary); }
.rs-ctl.is-drag .rs-bubble, .rs-thumb:hover .rs-bubble, .rs-thumb:focus-visible .rs-bubble { opacity: 1; transform: translate(-50%, 0); }

/* Tezkor radius yorliqlari (nuqtalar ostida) */
.rs-labels { position: relative; height: 1.125rem; margin-top: -0.125rem; }
.rs-lab {
  position: absolute; top: 0; left: calc(var(--x) * 1%); padding: 0 0.25rem; border: 0; border-radius: var(--radius-sm); background: none;
  transform: translateX(-50%); color: var(--muted-foreground); font: inherit; font-size: 0.6875rem; line-height: 1.125rem;
  font-variant-numeric: tabular-nums; cursor: pointer; transition: color var(--duration-fast), background-color var(--duration-fast);
}
.rs-lab:hover { background-color: var(--accent); color: var(--foreground); }
.rs-lab.is-active { color: var(--foreground); font-weight: 700; }

/* Qiymat maydoni (birlik "m" maydon ichida); tezkor radiusdan tashqari qiymat tanlansa .is-active */
.radius-input {
  flex: none; display: inline-flex; align-items: center; height: 2rem; padding-right: 0.625rem;
  border: 1px solid var(--input); border-radius: var(--radius-md); background-color: var(--field-bg); box-shadow: var(--shadow-xs);
  color: var(--muted-foreground); font-size: 0.8125rem; cursor: text;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), background-color var(--duration-fast);
}
.radius-input:hover { border-color: color-mix(in oklab, var(--input) 60%, var(--foreground)); }
.radius-input:focus-within { border-color: var(--focus-border); box-shadow: var(--ring-glow), var(--shadow-xs); }
.radius-input input {
  width: 4.25rem; height: 100%; padding: 0 0.25rem 0 0.625rem; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.radius-input input:hover, .radius-input input:focus-visible { border: 0; box-shadow: none; }
.radius-input input::-webkit-outer-spin-button, .radius-input input::-webkit-inner-spin-button { margin: 0; appearance: none; }
.radius-input.is-active { border-color: color-mix(in oklab, var(--input) 45%, var(--foreground)); background-color: var(--accent); color: var(--accent-foreground); }
.radius-input.is-active input { font-weight: 600; color: var(--foreground); }

/* compact — tor yon panel (taqqoslash): yuqorida [Sayt radiusi][maydon], pastda butun enli slayder; mayda yorliqlar yashirin */
.rs-ctl.is-compact .rs-auto { flex: 1 1 0; justify-content: center; }
.rs-ctl.is-compact .radius-input { flex: 0 0 6.25rem; }
.rs-ctl.is-compact .rs { order: 3; flex: 1 1 100%; }
.rs-ctl.is-compact .rs-lab.is-minor { display: none; }

@media (prefers-reduced-motion: reduce) {
  .rs-fill, .rs-thumb, .rs-bubble, .rs-dot, .rs-lab { transition: none; }
}
