/* ==========================================================
   eSklad — dizayn tizimi (design tokens)
   Barcha klass nomlari eski holicha: faqat ko'rinish yangilandi.
   ========================================================== */
:root {
    /* Neytral (slate) */
    --c-bg:        #f1f5f9;
    --c-surface:   #ffffff;
    --c-surface-2: #f8fafc;
    --c-surface-3: #f1f5f9;
    --c-border:    #e2e8f0;
    --c-border-2:  #cbd5e1;

    /* Matn */
    --c-text:      #0f172a;
    --c-text-2:    #475569;
    --c-muted:     #64748b;
    --c-faint:     #94a3b8;

    /* Brend */
    --c-primary:      #4f46e5;
    --c-primary-600:  #4338ca;
    --c-primary-700:  #3730a3;
    --c-primary-soft: #eef2ff;
    --c-primary-ring: rgba(79, 70, 229, 0.18);

    --c-accent:    #10b981;
    --c-success:   #059669;
    --c-success-soft: #ecfdf5;
    --c-warn:      #d97706;
    --c-warn-soft: #fffbeb;
    --c-danger:    #dc2626;
    --c-danger-soft: #fef2f2;
    --c-info:      #0284c7;
    --c-info-soft: #f0f9ff;

    /* Navbar */
    --c-nav:       #0b1220;
    --c-nav-2:     #131f38;
    --c-nav-text:  #94a3b8;

    /* Radiuslar */
    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 18px;
    --r-full: 999px;

    /* Soyalar — nozik, ko'p qatlamli */
    --sh-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --sh-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
    --sh-md: 0 2px 4px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.06);
    --sh-lg: 0 4px 8px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.10);
    --sh-xl: 0 18px 50px rgba(15, 23, 42, 0.16);

    --fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --slow: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --font: "Inter", "Inter var", ui-sans-serif, system-ui, -apple-system,
            "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-num: ui-monospace, "SF Mono", "Segoe UI Mono", "Roboto Mono", Menlo, monospace;
}

/* ==========================================================
   BAZA
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--c-bg);
    background-image:
        radial-gradient(1200px 600px at 100% -10%, rgba(79, 70, 229, 0.05), transparent 60%),
        radial-gradient(900px 500px at 0% 0%, rgba(16, 185, 129, 0.04), transparent 55%);
    background-attachment: fixed;
    color: var(--c-text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    min-height: 100vh;
}

a { color: var(--c-primary); text-decoration: none; transition: color var(--fast); }
a:hover { color: var(--c-primary-600); text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; }

::selection { background: var(--c-primary-ring); color: var(--c-primary-700); }

/* Yagona fokus uslubi — klaviatura bilan yurish uchun */
:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

/* Nozik skrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--c-border-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: var(--c-border-2);
    border-radius: var(--r-full);
    border: 3px solid transparent;
    background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--c-faint); background-clip: content-box; }

/* ==========================================================
   TIPOGRAFIYA
   ========================================================== */
h1 {
    margin: 0 0 22px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--c-text);
    line-height: 1.25;
}
h2 {
    margin: 22px 0 12px;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--c-text);
}

/* ==========================================================
   TOPBAR
   ========================================================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(100deg, var(--c-nav) 0%, var(--c-nav-2) 55%, #1b2b52 100%);
    color: #fff;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 6px 24px rgba(2, 6, 23, 0.28);
}
.topbar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), rgba(16, 185, 129, 0.4), transparent);
}

.topbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
    transition: opacity var(--fast);
}
.topbar .brand:hover { text-decoration: none; opacity: 0.85; }
.topbar .brand-logo {
    width: 34px; height: 34px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.topbar .brand-name {
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: #fff;
}
.topbar .brand-accent { color: var(--c-accent); }

.topbar nav {
    display: flex;
    gap: 2px;
    margin-left: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.topbar nav a {
    position: relative;
    color: var(--c-nav-text);
    padding: 7px 12px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    font-weight: 550;
    transition: background var(--fast), color var(--fast);
    text-decoration: none;
    white-space: nowrap;
}
.topbar nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    text-decoration: none;
}
.topbar nav a:active { background: rgba(255, 255, 255, 0.14); }

/* Menyudagi dropdown (Pryomka ▾) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    background: none;
    border: none;
    color: var(--c-nav-text);
    padding: 7px 12px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    font-weight: 550;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    transition: background var(--fast), color var(--fast);
    white-space: nowrap;
}
.nav-dropdown-toggle:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
.nav-dropdown.open .nav-dropdown-toggle { color: #fff; background: rgba(255, 255, 255, 0.12); }
.nav-dropdown-caret {
    font-size: 9px;
    line-height: 1;
    opacity: 0.7;
    transition: transform var(--fast);
}
.nav-dropdown.open .nav-dropdown-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #172136;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--r-md);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.5);
    min-width: 210px;
    padding: 6px;
    z-index: 100;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; animation: ddIn 0.16s ease; }
@keyframes ddIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-menu a {
    display: block;
    color: var(--c-nav-text);
    padding: 9px 12px;
    border-radius: var(--r-xs);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--fast), color var(--fast);
}
.nav-dropdown-menu a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); text-decoration: none; }

/* Hamburger — faqat mobil/planshetda ko'rinadi (pastdagi media query) */
.nav-toggle {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    margin: 0; padding: 0; border: 0;
}
.nav-burger { display: none; }

/* Foydalanuvchi bloki */
.user-box {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--c-nav-text);
    font-size: 13px;
}
.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 550;
    white-space: nowrap;
}
.user-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: linear-gradient(135deg, var(--c-primary), #6366f1);
    border-radius: 50%;
    font-size: 13px;
    flex-shrink: 0;
}
.user-role { display: none; }

.btn-logout {
    background: rgba(220, 38, 38, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.28);
    padding: 7px 13px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    transition: background var(--fast), color var(--fast), border-color var(--fast);
}
.btn-logout:hover { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }

/* Til almashtirish (uz / ru) */
.lang-switch {
    display: flex;
    gap: 3px;
    margin-left: auto;
    margin-right: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-sm);
    padding: 3px;
}
.lang-switch a {
    padding: 4px 10px;
    border-radius: var(--r-xs);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--c-nav-text);
    text-decoration: none;
    line-height: 1.5;
    transition: background var(--fast), color var(--fast);
}
.lang-switch a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.lang-switch a.lang-active {
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.5);
}

/* ==========================================================
   LAYOUT
   ========================================================== */
.container {
    max-width: 1280px;
    margin: 28px auto 48px;
    padding: 0 24px;
}

.footer {
    margin-top: 56px;
    padding: 28px 24px;
    background: var(--c-nav);
    color: var(--c-nav-text);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
.footer-logo { width: 38px; height: 38px; opacity: 0.85; flex-shrink: 0; }
.footer-brand { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.footer-tag { font-size: 12px; color: #64748b; }
.brand-accent { color: var(--c-accent); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ==========================================================
   KARTA VA PANEL
   ========================================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 18px;
    box-shadow: var(--sh-sm);
}
.card .label {
    color: var(--c-muted);
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.card .value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 4px;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
.card.income .value  { color: var(--c-success); }
.card.expense .value { color: var(--c-danger); }
.card.balance .value { color: var(--c-primary); }

.panel {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 20px;
    box-shadow: var(--sh-sm);
    min-width: 0;
}
.panel h2 { margin-top: 0; }

/* ==========================================================
   TOOLBAR VA QIDIRUV
   ========================================================== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}
.toolbar .search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar form { margin: 0; }

/* Umumiy toolbar maydonlari (sana, filtr select va h.k.) */
.toolbar input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.toolbar select {
    padding: 10px 13px;
    border: 1px solid var(--c-border-2);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--c-text);
    background-color: var(--c-surface);
    box-shadow: var(--sh-xs);
    transition: border-color var(--fast), box-shadow var(--fast);
}
.toolbar input::placeholder { color: var(--c-faint); }
.toolbar input:not([type="hidden"]):hover,
.toolbar select:hover { border-color: var(--c-faint); }
.toolbar input:not([type="hidden"]):focus,
.toolbar select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-ring);
}
.toolbar select { padding-right: 36px; cursor: pointer; }

/* Matnli qidiruv maydoni — ichida lupa ikonkasi (SVG data-URI, tashqi fayl kerak emas) */
/* :not(...) — umumiy `.toolbar input` qoidasining `padding` shorthand'idan
   ustun bo'lishi uchun (aks holda ikonka matn ustiga chiqib ketadi) */
.toolbar .search input[type="text"]:not([type="hidden"]),
.toolbar .search input[type="search"]:not([type="hidden"]) {
    padding: 10px 13px 10px 38px;
    width: 300px;
    max-width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 13px center;
}
.toolbar input[type="date"] { cursor: pointer; }

/* ==========================================================
   JADVALLAR
   ========================================================== */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: var(--c-surface);
    box-shadow: var(--sh-sm);
}
/* Panel ichidagi jadval o'rami ikki marta ramka bermasin */
.panel .table-wrap { border: 0; border-radius: var(--r-md); box-shadow: none; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-surface);
    border-radius: var(--r-lg);
    overflow: hidden;
}
/* O'ramsiz turgan jadvalga ramka va soya */
.table-wrap > table { border-radius: 0; box-shadow: none; }

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
    vertical-align: middle;
}
thead th {
    background: var(--c-surface-2);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-muted);
    white-space: nowrap;
    border-bottom: 1px solid var(--c-border);
}
tbody tr { transition: background var(--fast); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--c-surface-2); }
tfoot td, tfoot th { background: var(--c-surface-2); font-weight: 650; }

td.num, th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
td.num { font-weight: 550; letter-spacing: -0.01em; }

/* Bo'sh holat kataklari */
.empty-cell {
    text-align: center;
    color: var(--c-faint);
    padding: 34px 16px !important;
    font-size: 13.5px;
}

/* Bosiladigan jadval qatorlari */
tr.row-clickable { cursor: pointer; }
tr.row-clickable:hover td { background: var(--c-primary-soft); }
.row-link { color: var(--c-text); font-weight: 600; }
.row-link:hover { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================
   TUGMALAR
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--fast), border-color var(--fast), color var(--fast),
                box-shadow var(--fast), transform var(--fast);
    box-shadow: var(--sh-xs);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled, .btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(180deg, #5b53ea 0%, var(--c-primary) 100%);
    color: #fff;
    border-color: var(--c-primary-600);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 1px 3px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(180deg, var(--c-primary) 0%, var(--c-primary-600) 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

.btn-success {
    background: linear-gradient(180deg, #10b981 0%, var(--c-success) 100%);
    color: #fff;
    border-color: #047857;
}
.btn-success:hover { background: linear-gradient(180deg, var(--c-success) 0%, #047857 100%); color: #fff; }

.btn-danger {
    background: linear-gradient(180deg, #ef4444 0%, var(--c-danger) 100%);
    color: #fff;
    border-color: #b91c1c;
}
.btn-danger:hover { background: linear-gradient(180deg, var(--c-danger) 0%, #b91c1c 100%); color: #fff; }

.btn-outline {
    background: var(--c-surface);
    color: var(--c-text-2);
    border: 1px solid var(--c-border-2);
}
.btn-outline:hover {
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
    border-color: #a5b4fc;
}

.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: var(--r-xs); }

/* ==========================================================
   FORMALAR VA MAYDONLAR
   ========================================================== */
form.stack .row { margin-bottom: 16px; }
form.stack label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--c-text-2);
    letter-spacing: -0.005em;
}

form.stack input,
form.stack select,
form.stack textarea,
.filter-form input,
.filter-form select,
.item-row input,
.item-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-border-2);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--c-text);
    background-color: var(--c-surface);
    box-shadow: var(--sh-xs);
    transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
}
form.stack input::placeholder,
form.stack textarea::placeholder,
.item-row input::placeholder { color: var(--c-faint); }

form.stack input:hover,
form.stack select:hover,
form.stack textarea:hover,
.filter-form input:hover,
.filter-form select:hover,
.item-row input:hover,
.item-row select:hover { border-color: var(--c-faint); }

form.stack input:focus,
form.stack select:focus,
form.stack textarea:focus,
.filter-form input:focus,
.filter-form select:focus,
.item-row input:focus,
.item-row select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-ring);
}

form.stack input:disabled,
form.stack input[readonly],
form.stack select:disabled,
.item-row input[readonly] {
    background: var(--c-surface-3);
    color: var(--c-text-2);
    cursor: default;
    box-shadow: none;
}

form.stack input[type="checkbox"],
form.stack input[type="radio"] {
    width: auto;
    box-shadow: none;
    accent-color: var(--c-primary);
}

/* Select uchun maxsus chevron (native o'q o'chiriladi) */
form.stack select,
.filter-form select,
.item-row select,
.toolbar select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}
/* Ko'p qatorli select (size>1) uchun chevron kerak emas */
form.stack select[multiple], form.stack select[size]:not([size="1"]) {
    background-image: none;
    padding-right: 12px;
}

/* Raqamli maydonlar — tabular raqamlar bilan tekis turadi */
form.stack input[type="number"],
form.stack input[inputmode="decimal"],
input.money-input,
.p-qty, .p-price, .p-sub {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
input.money-input { font-weight: 600; }

/* Sana / vaqt maydonlari brauzer ikonkasi bilan */
form.stack input[type="date"],
form.stack input[type="datetime-local"],
.filter-form input[type="date"] { cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0.55;
    cursor: pointer;
    transition: opacity var(--fast);
}
input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }

form.stack textarea { min-height: 88px; resize: vertical; line-height: 1.6; }

form.stack .actions,
.actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
    align-items: center;
}

form.stack .hint,
.hint {
    display: block;
    margin-top: 6px;
    color: var(--c-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

/* Filtr formasi (akt sverka va boshqalar) */
.filter-form { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.filter-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--c-text-2);
    margin-bottom: 6px;
}
.filter-form .field { min-width: 190px; flex: 1 1 190px; }
.filter-form .filter-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Checkbox qatori — `form.stack label` dan kuchliroq bo'lishi shart */
.checkbox-row,
form.stack label.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-weight: 500;
    color: var(--c-text-2);
    margin-bottom: 0;
    padding: 3px 0;
    transition: color var(--fast);
}
.checkbox-row:hover { color: var(--c-text); }
.checkbox-row input[type=checkbox],
form.stack .checkbox-row input[type=checkbox] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--c-primary);
    flex-shrink: 0;
    box-shadow: none;
}

/* ==========================================================
   BADGE VA HOLAT BELGILARI
   ========================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-full);
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.badge-new       { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.badge-ready     { background: var(--c-warn-soft); color: #b45309; border-color: #fde68a; }
.badge-delivered { background: var(--c-success-soft); color: #047857; border-color: #a7f3d0; }
.badge-cancelled { background: var(--c-danger-soft); color: #b91c1c; border-color: #fecaca; }
.badge-debt      { background: var(--c-danger-soft); color: #b91c1c; border-color: #fecaca; }
.badge-credit    { background: var(--c-success-soft); color: #047857; border-color: #a7f3d0; }
.badge-zero      { background: var(--c-info-soft); color: #0369a1; border-color: #bae6fd; }

.amount-pos { color: var(--c-success); font-weight: 650; }
.amount-neg { color: var(--c-danger); font-weight: 650; }

/* ==========================================================
   XABARLAR (flash)
   ========================================================== */
.flash-error, .flash-success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--r-md);
    margin: 0 0 18px;
    font-weight: 500;
    font-size: 13.5px;
    line-height: 1.5;
    box-shadow: var(--sh-xs);
    animation: flashIn 0.22s ease;
}
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.flash-error {
    background: var(--c-danger-soft);
    color: #991b1b;
    border: 1px solid #fecaca;
    border-left: 3px solid var(--c-danger);
}
.flash-success {
    background: var(--c-success-soft);
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-left: 3px solid var(--c-success);
}
.flash-error::before  { content: "⚠"; font-size: 15px; line-height: 1.3; flex-shrink: 0; }
.flash-success::before { content: "✓"; font-size: 15px; line-height: 1.3; flex-shrink: 0; }

/* ==========================================================
   QR, HUJJAT SARLAVHASI, AMALLAR
   ========================================================== */
.qr-img {
    width: 140px;
    height: 140px;
    border-radius: var(--r-sm);
    background: #fff;
    padding: 4px;
    border: 1px solid var(--c-border);
}

.doc-org {
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 14px;
    margin-bottom: 18px;
}
.doc-org-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.01em;
}
.doc-org-line { color: var(--c-text-2); font-size: 13px; margin-top: 3px; }

.doc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.export-group { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Sotuv/pryomka formasidagi yakuniy summa */
.grand-total {
    text-align: right;
    margin-top: 18px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--c-primary-soft) 0%, #f5f3ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: var(--r-md);
    font-size: 14px;
    color: var(--c-primary-700);
    font-weight: 600;
}
.grand-total b {
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--c-primary-700);
    margin-left: 4px;
}

/* Sahifa tepasidagi izoh matni */
.page-hint {
    color: var(--c-muted);
    font-size: 13.5px;
    margin: -10px 0 18px;
    max-width: 70ch;
    line-height: 1.6;
}

/* Akt sverka yakuniy xulosasi */
.akt-summary {
    margin-top: 22px;
    padding: 16px 18px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-primary);
    border-radius: var(--r-md);
    font-size: 14.5px;
}
.akt-summary b { font-weight: 700; }
.akt-summary span { font-variant-numeric: tabular-nums; font-weight: 650; }

/* ==========================================================
   MAHSULOT QATORLARI (sotuv / pryomka formasi)
   ========================================================== */
.item-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.item-row-head {
    font-weight: 700;
    color: var(--c-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.item-row .p-sub { background: var(--c-surface-3); font-weight: 650; }

/* ==========================================================
   KLIENT BALANSI (sotuv formasida)
   ========================================================== */
.balance-box {
    margin-top: 10px;
    padding: 11px 14px;
    border-radius: var(--r-md);
    font-weight: 650;
    font-size: 13.5px;
    border: 1px solid transparent;
}
.balance-box[hidden] { display: none; }
.balance-debt    { background: var(--c-danger-soft); color: #b91c1c; border-color: #fecaca; }
.balance-credit  { background: var(--c-success-soft); color: #047857; border-color: #a7f3d0; }
.balance-zero    { background: var(--c-info-soft); color: #0369a1; border-color: #bae6fd; }
.balance-loading { background: var(--c-surface-3); color: var(--c-muted); border-color: var(--c-border); font-weight: 500; }

/* ==========================================================
   PROFIL
   ========================================================== */
.profile-info { display: flex; flex-direction: column; gap: 8px; }
.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    transition: border-color var(--fast), background var(--fast);
}
.profile-row:hover { border-color: #c7d2fe; background: var(--c-primary-soft); }
.profile-label { color: var(--c-muted); font-weight: 550; font-size: 13px; }
.profile-value { color: var(--c-text); font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.profile-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--c-primary), #6366f1);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--r-full);
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.04em;
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.3);
}

/* ==========================================================
   RUXSATLAR (users form / view)
   ========================================================== */
.perm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
    flex-wrap: wrap;
}
.perm-bulk-actions { display: flex; gap: 8px; }
.perm-groups { display: flex; flex-direction: column; gap: 14px; }
.perm-group {
    padding: 14px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    transition: border-color var(--fast);
}
.perm-group:hover { border-color: var(--c-border-2); }
.perm-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--c-border);
}
.perm-group-title {
    font-weight: 700;
    color: var(--c-primary-700);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.perm-group-toggle {
    font-size: 11px;
    font-weight: 600;
    color: var(--c-muted);
    text-decoration: none;
    padding: 3px 10px;
    border: 1px dashed var(--c-border-2);
    border-radius: var(--r-xs);
    white-space: nowrap;
    transition: color var(--fast), border-color var(--fast), background var(--fast);
}
.perm-group-toggle:hover {
    color: var(--c-primary);
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
    text-decoration: none;
}

.perm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.perm-view-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 0;
    color: var(--c-text-2);
    font-size: 13.5px;
}
.perm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: var(--r-xs);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.perm-icon.on  { background: #d1fae5; color: #047857; }
.perm-icon.off { background: #fee2e2; color: #b91c1c; }

/* ==========================================================
   DINAMIK QO'SHIMCHA MAYDONLAR (product attributes)
   ========================================================== */
.attr-block {
    margin-top: 6px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 16px;
    background: var(--c-surface-2);
}
.attr-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.attr-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--c-text);
    font-size: 14px;
}
.attr-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: var(--r-full);
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
    border: 1px solid #c7d2fe;
    font-size: 11px;
    font-weight: 700;
}
.attr-hint { color: var(--c-muted); font-size: 12px; font-weight: 400; }
.attr-list { display: flex; flex-direction: column; gap: 8px; }
.attr-row {
    display: grid;
    grid-template-columns: 1fr 1fr 38px;
    gap: 8px;
    align-items: center;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 8px;
    animation: attrIn 0.18s ease;
    transition: border-color var(--fast), box-shadow var(--fast);
}
.attr-row:hover { border-color: #c7d2fe; box-shadow: var(--sh-xs); }
@keyframes attrIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
form.stack .attr-row input { margin: 0; padding: 9px 11px; font-size: 13.5px; }
.attr-del {
    width: 36px;
    height: 36px;
    border: 1px solid #fecaca;
    background: var(--c-danger-soft);
    color: var(--c-danger);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--fast), color var(--fast), border-color var(--fast);
}
.attr-del:hover { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.attr-add {
    margin-top: 12px;
    width: 100%;
    padding: 11px;
    border: 1px dashed #a5b4fc;
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
    border-radius: var(--r-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    font-family: inherit;
    transition: background var(--fast), border-color var(--fast);
}
.attr-add:hover { background: #e0e7ff; border-color: var(--c-primary); }
.attr-empty {
    color: var(--c-faint);
    font-size: 13px;
    text-align: center;
    padding: 18px 8px;
    border: 1px dashed var(--c-border);
    border-radius: var(--r-md);
    background: var(--c-surface);
}
.attr-empty.hidden { display: none; }

.attr-view-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.attr-view-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 13px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: var(--c-surface-2);
    transition: border-color var(--fast);
}
.attr-view-row:hover { border-color: #c7d2fe; }
.attr-view-name { color: var(--c-muted); font-weight: 550; font-size: 13px; }
.attr-view-value { color: var(--c-text); font-weight: 700; text-align: right; overflow-wrap: anywhere; }

/* ==========================================================
   TO'LOV CHEKI (payment check)
   ========================================================== */
.check {
    max-width: 760px;
    margin: 0 auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    padding: 34px;
    box-shadow: var(--sh-md);
}
.check-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 2px dashed var(--c-border-2);
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}
.check-org-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 5px;
    letter-spacing: -0.01em;
}
.check-org-line { font-size: 12px; color: var(--c-muted); line-height: 1.6; }
.check-title { text-align: right; }
.check-title-main {
    font-size: 16px;
    font-weight: 750;
    color: var(--c-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.check-title-no {
    font-size: 24px;
    color: var(--c-text);
    font-weight: 750;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.check-title-date { font-size: 12px; color: var(--c-muted); margin-top: 4px; }
.check-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.check-table th {
    text-align: left;
    color: var(--c-muted);
    font-weight: 550;
    padding: 10px 0;
    width: 32%;
    font-size: 13px;
    vertical-align: top;
    background: none;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px dotted var(--c-border);
}
.check-table td {
    padding: 10px 0;
    color: var(--c-text);
    border-bottom: 1px dotted var(--c-border);
    font-size: 14px;
    font-weight: 550;
}
.check-amount {
    background: linear-gradient(135deg, var(--c-success-soft) 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
    border-radius: var(--r-lg);
    padding: 22px;
    text-align: center;
    margin: 22px 0;
}
.check-amount-label {
    color: #047857;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 8px;
}
.check-amount-value {
    font-size: 30px;
    font-weight: 780;
    color: #065f46;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.check-amount-words { color: #047857; font-size: 13px; font-style: italic; }
.check-signs {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 44px;
    flex-wrap: wrap;
}
.check-sign { flex: 1; min-width: 200px; }
.check-sign-line { border-bottom: 1px solid var(--c-border-2); height: 40px; margin-bottom: 7px; }
.check-sign-label { text-align: center; color: var(--c-muted); font-size: 12px; }

/* ==========================================================
   DASHBOARD — statistika kartochkalari va chartlar
   ========================================================== */
.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    border-left: 3px solid var(--c-faint);
    transition: transform var(--slow), box-shadow var(--slow), border-color var(--slow);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.stat-card .stat-icon {
    width: 46px; height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    font-size: 21px;
    background: var(--c-surface-3);
    flex-shrink: 0;
}
.stat-card .cur { font-size: 12px; color: var(--c-muted); font-weight: 550; margin-left: 3px; }

.stat-products  { border-left-color: var(--c-primary); }
.stat-products  .stat-icon { background: var(--c-primary-soft); }
.stat-clients   { border-left-color: #8b5cf6; }
.stat-clients   .stat-icon { background: #f5f3ff; }
.stat-sales     { border-left-color: var(--c-success); }
.stat-sales     .stat-icon { background: var(--c-success-soft); }
.stat-sales     .value { color: var(--c-success); }
.stat-payments  { border-left-color: #f59e0b; }
.stat-payments  .stat-icon { background: var(--c-warn-soft); }
.stat-payments  .value { color: var(--c-warn); }
.stat-cash      { border-left-color: var(--c-info); }
.stat-cash      .stat-icon { background: var(--c-info-soft); }
.stat-cash      .value { color: var(--c-info); }

/* Davr statistikasi (hafta / oy / yil) */
.period-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.period-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 16px 18px;
    box-shadow: var(--sh-sm);
    border-top: 3px solid var(--c-primary);
    transition: box-shadow var(--slow);
}
.period-card:hover { box-shadow: var(--sh-md); }
.period-card:nth-child(2) { border-top-color: var(--c-success); }
.period-card:nth-child(3) { border-top-color: #f59e0b; }
.period-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--c-muted);
    font-weight: 700;
    letter-spacing: 0.07em;
    margin-bottom: 12px;
}
.period-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--c-border);
    font-size: 13px;
}
.period-row:last-child { border-bottom: 0; padding-bottom: 0; }
.period-label { color: var(--c-text-2); }
.period-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    text-align: right;
}
.period-value.pos { color: var(--c-success); }
.period-value.pay { color: var(--c-warn); }
.period-value span:last-child { font-size: 11px; color: var(--c-faint); font-weight: 500; margin-left: 3px; }

/* Chart grid */
.grid-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 900px) { .grid-charts { grid-template-columns: 1fr; } }

.chart-panel { display: flex; flex-direction: column; }
.chart-panel h2 { margin: 0; font-size: 15px; }
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.chart-tabs {
    display: inline-flex;
    background: var(--c-surface-3);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 3px;
    gap: 2px;
}
.chart-tab {
    background: transparent;
    border: 0;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 650;
    color: var(--c-muted);
    cursor: pointer;
    border-radius: var(--r-xs);
    font-family: inherit;
    transition: background var(--fast), color var(--fast), box-shadow var(--fast);
}
.chart-tab:hover { color: var(--c-text); }
.chart-tab.active {
    background: var(--c-surface);
    color: var(--c-primary-700);
    box-shadow: var(--sh-sm);
}

.chart-box { position: relative; height: 320px; width: 100%; }
.chart-box-doughnut { height: 280px; }
.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--c-faint);
    font-size: 30px;
}

/* ==========================================================
   XATOLIK SAHIFASI (404 / generic)
   ========================================================== */
.err-page {
    max-width: 580px;
    margin: 48px auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    padding: 46px 30px;
    text-align: center;
    box-shadow: var(--sh-lg);
}
.err-code {
    font-size: 96px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(120deg, var(--c-primary) 0%, #8b5cf6 50%, var(--c-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.05em;
}
.err-emoji { font-size: 44px; margin: 10px 0 12px; }
.err-title { margin: 6px 0 8px; font-size: 22px; color: var(--c-text); }
.err-msg { color: var(--c-muted); margin: 0 0 16px; font-size: 15px; }
.err-path { margin: 0 0 22px; }
.err-path code {
    background: var(--c-surface-3);
    color: var(--c-text-2);
    padding: 5px 11px;
    border-radius: var(--r-xs);
    font-family: var(--font-num);
    font-size: 12.5px;
    word-break: break-all;
}
.err-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.err-actions .btn { padding: 11px 20px; font-size: 14px; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* --- Planshet va pastda: navbar burger menyuga aylanadi --- */
@media (max-width: 1024px) {
    .topbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 16px;
    }
    .nav-burger {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        margin-left: auto;
        border-radius: var(--r-md);
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.08);
        cursor: pointer;
        flex-shrink: 0;
    }
    .nav-burger span {
        display: block;
        width: 20px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }
    .nav-toggle:checked + .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked + .nav-burger span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked + .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav-toggle:focus-visible + .nav-burger { outline: 2px solid #fff; outline-offset: 2px; }

    /* Yopiq holat */
    .topbar nav,
    .topbar .user-box {
        display: none;
        flex-basis: 100%;
        margin-left: 0;
    }
    /* Ochiq holat */
    .nav-toggle:checked ~ nav {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .nav-toggle:checked ~ .user-box {
        display: flex;
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .topbar nav a {
        padding: 11px 12px;
        border-radius: var(--r-sm);
        font-size: 15px;
    }
    /* Mobile'da dropdown yopilmasin — ichidagi havolalar inline chiqadi */
    .nav-dropdown-toggle { display: none; }
    .nav-dropdown-menu {
        display: block;
        position: static;
        margin: 0;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        min-width: 0;
        animation: none;
    }
    .nav-dropdown-menu a { padding: 11px 12px; font-size: 15px; }
    .btn-logout { padding: 10px 15px; font-size: 13px; }
    .lang-switch { margin-right: 8px; }
}

/* --- Telefon --- */
@media (max-width: 640px) {
    .container { margin: 18px auto 32px; padding: 0 14px; }
    h1 { font-size: 21px; margin-bottom: 16px; }
    h2 { font-size: 16px; }

    .cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
    .card { padding: 14px; border-radius: var(--r-md); }
    .card .value { font-size: 18px; }

    .panel { padding: 16px; border-radius: var(--r-md); }
    .table-wrap { border-radius: var(--r-md); }

    /* Toolbar: qidiruv va tugma ustma-ust */
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar .search { width: 100%; }
    .toolbar .search input[type="text"]:not([type="hidden"]),
    .toolbar .search input[type="search"]:not([type="hidden"]) { width: 100%; flex: 1 1 150px; }
    .toolbar > .btn { text-align: center; justify-content: center; }

    /* Jadval juda siqilib ketmasin — o'ram ichida skroll bo'lsin */
    .table-wrap table { min-width: 600px; }
    th, td { padding: 10px 12px; }
    .empty-cell { padding: 26px 12px !important; }

    /* Amal tugmalari katakda ustma-ust joylashsin */
    td .btn-sm { display: inline-flex; margin: 2px 2px 2px 0; }

    /* iOS input'ga bosganda sahifani kattalashtirib yubormasligi uchun 16px */
    form.stack input, form.stack select, form.stack textarea,
    .toolbar input, .toolbar select,
    .filter-form select, .filter-form input,
    .item-row input, .item-row select {
        font-size: 16px;
    }

    .btn { padding: 10px 15px; font-size: 14px; }
    .btn-sm { padding: 7px 11px; font-size: 12.5px; }
    form.stack .actions .btn { flex: 1 1 auto; }

    .footer { margin-top: 32px; padding: 22px 14px; }
    .qr-img { width: 120px; height: 120px; }

    .perm-list { grid-template-columns: 1fr; }
    .check { padding: 22px 18px; border-radius: var(--r-lg); }
    .check-amount-value { font-size: 24px; }
    .check-title { text-align: left; }

    .stat-card { padding: 13px; gap: 11px; }
    .stat-card .stat-icon { width: 40px; height: 40px; font-size: 19px; border-radius: var(--r-sm); }
    .chart-box { height: 260px; }
    .chart-box-doughnut { height: 240px; }
    .chart-tab { padding: 6px 11px; font-size: 11.5px; }
    .period-card { padding: 14px; }

    .grand-total { padding: 12px 14px; font-size: 14px; }
    .grand-total b { font-size: 19px; }
}

/* --- Sotuv formasidagi mahsulot qatorlari --- */
@media (max-width: 720px) {
    .item-row-head { display: none; }
    .item-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 14px;
        margin-bottom: 12px;
        border: 1px solid var(--c-border);
        border-radius: var(--r-md);
        background: var(--c-surface-2);
    }
    .item-row .p-select { grid-column: 1 / -1; }
    .item-row input, .item-row select { width: 100%; }
    .item-row > .btn { grid-column: 1 / -1; justify-content: center; }
}

@media (max-width: 520px) {
    .err-page { padding: 30px 18px; margin: 20px auto; border-radius: var(--r-lg); }
    .err-code { font-size: 70px; }
    .err-emoji { font-size: 36px; }
    .err-title { font-size: 19px; }
    .attr-row { grid-template-columns: 1fr 1fr 34px; gap: 6px; }
    .attr-block { padding: 12px 10px; }
}

/* Harakatni kamaytirish sozlamasi yoqilgan bo'lsa */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .stat-card:hover { transform: none; }
}

/* ==========================================================
   CHOP ETISH
   ========================================================== */
@media print {
    .topbar, .footer, .toolbar, .doc-actions, .filter-form, .lang-switch,
    .no-print, .btn, form[method="post"] { display: none !important; }

    body {
        background: #fff !important;
        background-image: none !important;
        color: #000;
        font-size: 12px;
    }
    .container { max-width: none; padding: 0; margin: 0; }
    .panel, .card, .table-wrap, .check {
        box-shadow: none !important;
        border: 0;
        padding: 0;
        border-radius: 0;
    }
    .check { max-width: none; }
    table { page-break-inside: auto; }
    tr { page-break-inside: avoid; }
    th, td { padding: 6px 8px; border-bottom: 1px solid #ddd; }
    thead th { background: #f2f2f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: #000; text-decoration: none; }
    .badge { border: 1px solid #999; }
}

/* ==========================================================
   PRODUCT FORM — modern layout (barcode, foto, kategoriya, ta'minotchi)
   ========================================================== */
.pf-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1024px) { .pf-grid { grid-template-columns: 1fr; } }

.pf-main, .pf-side { display: flex; flex-direction: column; gap: 18px; }
.pf-section { padding: 22px; }
.pf-title {
    margin: 0 0 18px;
    padding-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--c-text);
    border-bottom: 1px dashed var(--c-border);
    letter-spacing: 0.01em;
}
.pf-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .pf-row-2 { grid-template-columns: 1fr; } }

/* Input + suffix (uzs, %, dona) */
.pf-input-suffix { position: relative; display: flex; align-items: stretch; }
.pf-input-suffix input {
    flex: 1 1 auto;
    padding-right: 56px !important;
}
.pf-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-muted);
    font-size: 12.5px;
    font-weight: 500;
    text-transform: lowercase;
    pointer-events: none;
    letter-spacing: 0.02em;
}

/* Input + generatsiya tugmasi */
.pf-with-gen .pf-input-wrap { position: relative; }
.pf-with-gen .pf-input-wrap input { padding-right: 110px !important; }
.pf-gen-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: transparent;
    color: var(--c-primary);
    border: 0;
    border-radius: var(--r-xs);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--fast);
}
.pf-gen-btn:hover { background: var(--c-primary-soft); }

/* ===== Narxlar bo'limi ===== */
.pf-price-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}
@media (max-width: 640px) { .pf-price-grid { grid-template-columns: 1fr; } }

.pf-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    margin-bottom: 0;
}
.pf-toggle-label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    font-weight: 600 !important;
    color: var(--c-text) !important;
    font-size: 13px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.pf-hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--c-border);
    color: var(--c-muted);
    font-size: 11px;
    font-weight: 700;
    cursor: help;
}

/* Modern toggle switch */
.pf-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.pf-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.pf-switch-slider {
    position: absolute;
    inset: 0;
    background: var(--c-border-2);
    border-radius: 999px;
    transition: background var(--fast);
    cursor: pointer;
}
.pf-switch-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--sh-sm);
    transition: transform var(--fast);
}
.pf-switch input:checked + .pf-switch-slider { background: var(--c-primary); }
.pf-switch input:checked + .pf-switch-slider::before { transform: translateX(20px); }
.pf-switch input:focus-visible + .pf-switch-slider {
    box-shadow: 0 0 0 3px var(--c-primary-ring);
}

/* ===== Foto dropzone ===== */
.pf-drop {
    border: 2px dashed var(--c-border-2);
    border-radius: var(--r-lg);
    padding: 26px 20px;
    text-align: center;
    background: var(--c-surface-2);
    cursor: pointer;
    transition: border-color var(--fast), background var(--fast);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pf-drop:hover, .pf-drop-hover {
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
}
.pf-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
}
.pf-drop-icon { width: 40px; height: 40px; color: var(--c-primary); opacity: 0.85; }
.pf-drop-text { font-size: 14px; font-weight: 600; color: var(--c-text); }
.pf-drop-or { font-size: 12px; color: var(--c-muted); }
.pf-drop-browse {
    background: transparent;
    border: 0;
    color: var(--c-primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--r-xs);
}
.pf-drop-browse:hover { background: rgba(79, 70, 229, 0.08); text-decoration: underline; }
.pf-drop-preview {
    max-width: 100%;
    max-height: 220px;
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
    object-fit: contain;
    background: #fff;
}
.pf-drop-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    background: var(--c-danger);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    font-weight: 700;
    box-shadow: var(--sh-md);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pf-drop-remove:hover { background: #b91c1c; }

/* ===== Ta'minotchi multi-select ===== */
.pf-multiselect { position: relative; }
.pf-multi-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    min-height: 48px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    transition: border-color var(--fast), box-shadow var(--fast);
}
.pf-multi-chips:focus-within {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-ring);
}
.pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 12px;
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.pf-chip-x {
    background: transparent;
    border: 0;
    color: var(--c-primary-700);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    opacity: 0.6;
    transition: opacity var(--fast), background var(--fast);
}
.pf-chip-x:hover { opacity: 1; background: rgba(79, 70, 229, 0.15); }
.pf-multi-input {
    flex: 1 1 120px;
    min-width: 100px;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
    padding: 4px 6px !important;
    box-shadow: none !important;
    font-size: 14px;
}
.pf-multi-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
    max-height: 240px;
    overflow-y: auto;
    z-index: 20;
    padding: 4px;
}
.pf-multi-item {
    padding: 8px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 14px;
    transition: background var(--fast);
}
.pf-multi-item:hover { background: var(--c-primary-soft); color: var(--c-primary-700); }

/* ===== Kategoriya picker (yon panel) ===== */
.pf-cat-panel { padding: 18px; }
.pf-cat-picker { display: flex; flex-direction: column; gap: 10px; }
.pf-cat-search {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 0 12px;
    transition: border-color var(--fast), box-shadow var(--fast);
}
.pf-cat-search:focus-within {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-ring);
    background: var(--c-surface);
}
.pf-cat-search svg { color: var(--c-muted); flex-shrink: 0; }
.pf-cat-search input {
    flex: 1 1 auto;
    border: 0 !important;
    background: transparent !important;
    padding: 10px 8px !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 13.5px;
}
.pf-cat-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 12px;
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--fast);
}
.pf-cat-add:hover { background: rgba(79, 70, 229, 0.15); text-decoration: none; }
.pf-cat-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 420px;
    overflow-y: auto;
    padding: 2px;
}
.pf-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--c-surface-2);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background var(--fast), border-color var(--fast);
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: var(--c-text) !important;
}
.pf-cat-item:hover { background: var(--c-primary-soft); }
.pf-cat-item input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.pf-cat-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--c-border-2);
    border-radius: 4px;
    background: var(--c-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color var(--fast), background var(--fast);
}
.pf-cat-item input[type="radio"]:checked ~ .pf-cat-check {
    background: var(--c-primary);
    border-color: var(--c-primary);
}
.pf-cat-item input[type="radio"]:checked ~ .pf-cat-check::after {
    content: "";
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 2px;
    display: block;
}
.pf-cat-item input[type="radio"]:checked ~ .pf-cat-name { color: var(--c-primary-700); font-weight: 600 !important; }
.pf-cat-item:has(input[type="radio"]:checked) {
    background: var(--c-primary-soft);
    border-color: var(--c-primary);
}
.pf-cat-name { flex: 1 1 auto; }
.pf-cat-parent {
    font-size: 11.5px;
    color: var(--c-muted);
    background: var(--c-border);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
}
.pf-cat-none .pf-cat-name { color: var(--c-muted); font-style: italic; }

/* ==========================================================
   PRODUCT LIST — nom + rasm birlashgan cell, kompakt jadval
   ========================================================== */
.prod-table { table-layout: auto; }
.prod-table th, .prod-table td { vertical-align: middle; }

.prod-table .col-id     { width: 56px; }
.prod-table .col-cat    { width: 130px; }
.prod-table .col-brand  { width: 110px; color: var(--c-text-2); }
.prod-table .col-sku    { width: 170px; }
.prod-table .col-money  { width: 120px; }
.prod-table .col-qty    { width: 90px; }
.prod-table .col-actions{ width: 130px; text-align: right; }

/* Nom kolonkasi — rasm + nom yonma-yon */
.prod-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}
.prod-cell-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.prod-cell-text .row-link { line-height: 1.3; }

.prod-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    max-width: none;
    border-radius: var(--r-sm);
    background: var(--c-surface-2);
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c-faint);
    border: 1px solid var(--c-border);
    box-shadow: var(--sh-xs);
}
.prod-thumb-empty { color: var(--c-faint); background: var(--c-surface-3); }

.prod-tag {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0.01em;
}
.prod-tag-free { background: var(--c-info-soft); color: var(--c-info); }

/* Kategoriya chip */
.cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.empty-dash { color: var(--c-faint); }

/* SKU + Barkod bir katakda */
.sku-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sku-code {
    font-family: var(--font-num);
    font-size: 12.5px;
    color: var(--c-text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sku-barcode {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-num);
    font-size: 11px;
    color: var(--c-muted);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sku-barcode svg { flex-shrink: 0; opacity: 0.7; }

/* Qoldiq + birlik bir katakda */
.qty-cell {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    justify-content: flex-end;
    width: 100%;
}
.qty-cell b { font-family: var(--font-num); font-weight: 600; }
.qty-unit { font-size: 11px; color: var(--c-muted); font-weight: 500; }

/* Kichik ekranda gorizontal skroll — rasm kichraymaydi */
@media (max-width: 1200px) {
    .prod-table-wrap table { min-width: 1050px; }
}

/* ==========================================================
   CATEGORY LIST — kartochka qatorlar
   ========================================================== */
.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xs);
    transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast);
}
.cat-row:hover {
    border-color: var(--c-primary);
    box-shadow: var(--sh-sm);
    transform: translateY(-1px);
}
.cat-row-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.cat-name { font-weight: 600; color: var(--c-text); }
.cat-badge {
    font-size: 11.5px;
    color: var(--c-muted);
    background: var(--c-surface-3);
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 500;
}
.cat-row-actions { display: inline-flex; gap: 6px; align-items: center; }
.cat-edit, .cat-del {
    width: 34px;
    height: 34px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-muted);
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color var(--fast), background var(--fast), border-color var(--fast);
    padding: 0;
}
.cat-edit:hover { color: var(--c-primary); border-color: var(--c-primary); background: var(--c-primary-soft); text-decoration: none; }
.cat-del:hover { color: var(--c-danger); border-color: var(--c-danger); background: var(--c-danger-soft); }

/* ==========================================================
   PRYOMKA — turi tanlash (kirim / vozvrat) — pill toggle
   ========================================================== */
.pf-type-toggle {
    display: inline-flex;
    gap: 4px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    padding: 4px;
    border-radius: 999px;
    align-items: center;
}
.pf-type-opt {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 16px !important;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--c-text-2) !important;
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: background var(--fast), color var(--fast);
}
.pf-type-opt input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.pf-type-opt:has(input:checked) {
    background: var(--c-primary);
    color: #fff !important;
    box-shadow: var(--sh-sm);
}
.pf-type-opt-return:has(input:checked) {
    background: var(--c-warn);
}

/* ==========================================================
   WAREHOUSE — kartochka grid
   ========================================================== */
.wh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.wh-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 18px;
    box-shadow: var(--sh-xs);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast);
}
.wh-card:hover { border-color: var(--c-primary); box-shadow: var(--sh-md); transform: translateY(-2px); }
.wh-card-default {
    border-color: var(--c-primary);
    background: linear-gradient(180deg, #fff 0%, var(--c-primary-soft) 100%);
}

.wh-card-head { display: flex; align-items: center; gap: 12px; }
.wh-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: var(--c-primary-soft);
    color: var(--c-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wh-card-title {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-weight: 700;
    color: var(--c-text);
    font-size: 15px;
    min-width: 0;
}
.wh-badge-default {
    align-self: flex-start;
    background: var(--c-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.wh-type {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--c-surface-3);
    color: var(--c-text-2);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wh-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--c-text-2);
    font-size: 13px;
    min-height: 20px;
}
.wh-row { display: flex; align-items: flex-start; gap: 8px; }
.wh-row svg { color: var(--c-muted); flex-shrink: 0; margin-top: 2px; }

.wh-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--c-border);
}

