/* =========================================================
   Revora — dizayn tizimi
   Ranglar token sifatida :root'da; tungi rejim pastda qayta belgilanadi.
   Brend (D:\revora logo\REVORA-Brand-Guideline.pdf): Navy #1E3A8A — asosiy, Sky #38BDF8 — faqat urg'u
   (grafik, faol holat; ustiga oq matn yozilmaydi), Sky Tint #A5E1FC, Mist #F3F6FC — fon, Ink #0F172A — matn.
   Holat ranglari (faqat interfeys): o'sish #16A34A, ogohlantirish #F59E0B, xavf/pasayish #DC2626.
   ========================================================= */
:root {
    --bg: #f3f6fc;
    --bg-grad: radial-gradient(1200px 600px at 100% -10%, #e3f2fd 0%, transparent 60%),
               radial-gradient(900px 500px at -10% 0%, #eaf0fa 0%, transparent 55%);
    --surface: #ffffff;
    --surface-2: #f3f6fc;
    --glass: rgba(255, 255, 255, .8);
    --text: #0f172a;
    --muted: #5b6b85;
    --border: #e1e7f2;
    --border-strong: #c9d3e5;

    --primary: #1e3a8a;
    --primary-hover: #172e6e;
    --primary-soft: #e6edf9;
    --primary-grad: linear-gradient(135deg, #24449c 0%, #1e3a8a 100%);
    --accent: #38bdf8;
    --sky-tint: #a5e1fc;
    --violet: #8b5cf6;
    --amber: #f59e0b;

    --success: #16a34a;
    --success-soft: #e3f5e9;
    --danger: #dc2626;
    --danger-soft: #fdecec;
    --warning: #b45309;
    --warning-soft: #fef3d7;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 48, .06);
    --shadow: 0 1px 2px rgba(16, 24, 48, .05), 0 4px 16px rgba(16, 24, 48, .06);
    --shadow-lg: 0 2px 6px rgba(16, 24, 48, .06), 0 16px 40px rgba(16, 24, 48, .12);
    --ring: 0 0 0 4px rgba(56, 189, 248, .28);

    --ease: cubic-bezier(.2, .8, .2, 1);
    --t-fast: .15s;
    --t: .25s;
    color-scheme: light;
}

:root[data-theme="dark"] {
        /* Qorong'i fon — Ink asosida; asosiy urg'u — Sky (qorong'i fonda Navy o'qilmaydi), logotip — oq versiya. */
        --bg: #0b1222;
        --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgba(56, 189, 248, .10) 0%, transparent 60%),
                   radial-gradient(900px 500px at -10% 0%, rgba(30, 58, 138, .35) 0%, transparent 55%);
        --surface: #121b30;
        --surface-2: #17223a;
        --glass: rgba(18, 27, 48, .8);
        --text: #e6ecf6;
        --muted: #93a2bd;
        --border: #233150;
        --border-strong: #31436a;
        --primary: #38bdf8;
        --primary-hover: #7dd3fc;
        --primary-soft: rgba(56, 189, 248, .14);
        --primary-grad: linear-gradient(135deg, #24449c 0%, #1e3a8a 100%);
        --accent: #38bdf8;
        --success: #4ade80;
        --success-soft: rgba(74, 222, 128, .13);
        --danger: #f87171;
        --danger-soft: rgba(248, 113, 113, .13);
        --warning: #f5c04e;
        --warning-soft: rgba(245, 192, 78, .14);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
        --shadow-lg: 0 4px 10px rgba(0, 0, 0, .3), 0 20px 48px rgba(0, 0, 0, .4);
        color-scheme: dark;
    }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    /* Figtree — lotin; kirill harflari Figtree'da yo'q, ular avtomatik Manrope'dan olinadi. */
    font-family: "Figtree", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-variant-numeric: tabular-nums;
    background: var(--bg-grad), var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
}

a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
h1, h2, h3 { letter-spacing: -.02em; }

/* ---------- Header ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 28px;
    transition: border-color var(--t), box-shadow var(--t);
}
.topbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.brand { font-weight: 800; font-size: 18px; color: var(--text); display: flex; align-items: center; gap: 10px; letter-spacing: -.02em; flex: none; }
.brand:hover { color: var(--text); }
/* Brend logotipi — tayyor fayl, proporsional (cho'zilmaydi). Gorizontal: kamida 120 px eni; tor ekranda — faqat belgi. */
/* Ko'rinadigani — bittasi: [rejim] × [o'lcham]. Och fonda — asosiy, qorong'i rejimda — oq; ≤360 px — faqat belgi. */
.brand img { display: none; height: 28px; width: auto; }
.brand-login img { height: 40px; }
.brand .brand-logo.brand-on-light, .brand-login .brand-on-light { display: block; }
@media (max-width: 600px) {
    .brand .brand-logo.brand-on-light { display: none; }
    .brand .brand-mark.brand-on-light { display: block; }
}
:root[data-theme="dark"] .brand .brand-logo.brand-on-light,
    :root[data-theme="dark"] .brand .brand-mark.brand-on-light,
    :root[data-theme="dark"] .brand-login .brand-on-light { display: none; }
    :root[data-theme="dark"] .brand .brand-logo.brand-on-dark,
    :root[data-theme="dark"] .brand-login .brand-on-dark { display: block; }
@media (max-width: 600px) {
    :root[data-theme="dark"] .brand .brand-logo.brand-on-dark { display: none; }
    :root[data-theme="dark"] .brand .brand-mark.brand-on-dark { display: block; }
}
.brand-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--primary-grad);
    box-shadow: 0 0 0 4px var(--primary-soft);
    animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--primary-soft); }
    50% { box-shadow: 0 0 0 8px transparent; }
}
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
    position: relative;
    color: var(--muted); padding: 8px 14px; border-radius: 10px;
    font-weight: 600; font-size: 14px; white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast);
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { color: var(--primary); background: var(--primary-soft); }

/* Ochiladigan menyular */
.nav-group { position: relative; }
.nav-toggle {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 10px;
    background: none; color: var(--muted); font: 600 14px/1.4 inherit; font-family: inherit; cursor: pointer; white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast);
}
.nav-toggle:hover, .nav-group.open .nav-toggle { background: var(--surface-2); color: var(--text); }
.nav-group.active .nav-toggle { color: var(--primary); background: var(--primary-soft); }
.nav-toggle .chev { width: 14px; height: 14px; transition: transform var(--t-fast); }
.nav-group.open .nav-toggle .chev { transform: rotate(180deg); }
.nav-menu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 210px; padding: 6px;
    display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
}
/* Menyu va tugma orasidagi bo'shliqdan sichqoncha o'tganda yopilib qolmasin. */
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-group.open .nav-menu { opacity: 1; visibility: visible; transform: none; }
/* Menyular faqat bosilganda ochiladi (ustiga borganda emas) — .nav-group.open. */
.nav-group.open .nav-toggle .chev { transform: rotate(180deg); }
.nav-menu a { display: block; padding: 9px 12px; border-radius: 8px; }
.nav-menu.align-right { left: auto; right: 0; }
.user-box { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.user-box span { white-space: nowrap; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-grad); color: #fff; font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}

/* ---------- Layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 32px 24px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.2; }
.subtitle { color: var(--muted); margin: 6px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

/* Sahifaga kirishda paydo bo'lish — qisqa (tezlik: avval oxirgi karta ~1 soniyada ko'rinardi). Tez o'tishda (html.rv-instant) — yo'q. */
.reveal { opacity: 0; transform: translateY(6px); animation: fadeUp .26s var(--ease) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.stagger > * { opacity: 0; transform: translateY(6px); animation: fadeUp .26s var(--ease) forwards; }
.stagger > *:nth-child(2) { animation-delay: .02s; }
.stagger > *:nth-child(3) { animation-delay: .04s; }
.stagger > *:nth-child(4) { animation-delay: .06s; }
.stagger > *:nth-child(5) { animation-delay: .08s; }
.stagger > *:nth-child(n+6) { animation-delay: .1s; }
html.rv-instant .reveal, html.rv-instant .stagger > * { animation: none; opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px;
    border-radius: 11px;
    border: 1px solid transparent;
    font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2;
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast),
                box-shadow var(--t), transform var(--t-fast) var(--ease);
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 4px 14px rgba(30, 58, 138, .28); }
.btn-primary:hover { color: #fff; box-shadow: 0 6px 20px rgba(30, 58, 138, .38); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.btn-block { width: 100%; }

/* ---------- Belgili amal tugmalari (13.11): tahrir / o'chirish / saqlash ----------
   Qatordagi amallar matnsiz, yonma-yon: <td class="act-cell"><div class="act-group">…</div></td>.
   Tugma: class="btn-act" (+ btn-act-del | btn-act-save; modal/forma oxirida btn-act-lg), ichida
   <svg th:replace="~{fragments/layout :: icoEdit|icoDelete|icoSave}"></svg>; title va aria-label majburiy. */
.act-cell { width: 1%; white-space: nowrap; text-align: right; }
.act-group { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; white-space: nowrap; vertical-align: middle; }
.act-group > form, .act-group > details { display: inline-flex; margin: 0; }
/* Faqat yashirin maydon + belgili tugmadan iborat forma (o'chirish) — ustunga tushmasin, yonidagi tugma bilan bir qatorda. */
form:has(> .btn-act):not(:has(input:not([type="hidden"]), select, textarea)) { display: inline-flex; margin: 0; vertical-align: middle; }
td:has(> .btn-act), td:has(> form > .btn-act), td:has(> .act-group) { white-space: nowrap; }
td:has(.btn-act) dialog { white-space: normal; text-align: start; }
.btn-act {
    display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box;
    width: 32px; height: 32px; padding: 0; margin: 0; vertical-align: middle;
    border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
    font: inherit; font-size: 0; line-height: 1; cursor: pointer; text-decoration: none; list-style: none;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast) var(--ease);
}
.btn-act::-webkit-details-marker { display: none; }
.btn-act::marker { content: ""; }
.btn-act svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.btn-act:hover, .btn-act:focus-visible { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); outline: none; }
.btn-act:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.btn-act:active { transform: scale(.94); }
.btn-act-del { color: color-mix(in srgb, var(--danger) 75%, var(--muted)); border-color: color-mix(in srgb, var(--danger) 28%, var(--border)); }
.btn-act-del:hover, .btn-act-del:focus-visible { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.btn-act-save { color: #fff; background: var(--primary-grad); border-color: transparent; box-shadow: 0 3px 10px rgba(30, 58, 138, .22); }
.btn-act-save:hover, .btn-act-save:focus-visible { color: #fff; background: var(--primary-grad); border-color: transparent; box-shadow: 0 5px 16px rgba(30, 58, 138, .34); }
.btn-act-save svg { stroke-width: 2.4; }
/* Platformaning asosiy egasi — tahrir tugmasi o'rniga qulf (RootOwnerGuard). */
.root-lock { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--muted); cursor: help; }
.root-lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-act-lg { width: 38px; height: 38px; border-radius: 10px; }
.btn-act-lg svg { width: 19px; height: 19px; }
.btn-act:disabled, .btn-act[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
/* Yuborilmoqda (app.js formaga aria-busy qo'yadi): matn o'zgarmaydi — saqlash belgisi o'rnida aylanuvchi halqa. */
.btn-act { position: relative; }
form[aria-busy="true"] .btn-act-save:disabled, .btn-act[aria-busy="true"] { opacity: .9; cursor: progress; }
form[aria-busy="true"] .btn-act-save:disabled svg, .btn-act[aria-busy="true"] svg { visibility: hidden; }
form[aria-busy="true"] .btn-act-save:disabled::after, .btn-act[aria-busy="true"]::after {
    content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid color-mix(in srgb, currentColor 35%, transparent); border-top-color: currentColor; animation: btn-act-spin .8s linear infinite; }
@keyframes btn-act-spin { to { transform: rotate(360deg); } }
/* Matnli tugmalar («Брон қилиш», «Ёзиш»…): yuborilayotganda — matn yonida aylanuvchi halqa, xodim yana bosmasin. */
form[aria-busy="true"] :is(.btn-primary, .btn-danger, .btn-secondary):is([type=submit], :not([type])):disabled { cursor: progress; opacity: .85; }
form[aria-busy="true"] :is(.btn-primary, .btn-danger, .btn-secondary):is([type=submit], :not([type])):disabled::after {
    content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 8px; vertical-align: -2px; border-radius: 50%;
    border: 2px solid color-mix(in srgb, currentColor 35%, transparent); border-top-color: currentColor; animation: btn-act-spin .8s linear infinite; }
@media (max-width: 640px) { .act-group { gap: 8px; } .btn-act { width: 36px; height: 36px; } .btn-act-lg { width: 40px; height: 40px; } }
@media print { .act-cell, .act-group, .btn-act { display: none !important; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-section { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 -6px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint { color: var(--muted); font-size: 12.5px; }
/* Asos (eng past ustuvorlik): .field tashqarisidagi tanlov va sana ham brauzer ko'rinishida qolmasin (POS «2 ▾», «Нарх календари» tepasi…). */
:where(select, input[type=date], input[type=time]) {
    font: inherit; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface-2); color: var(--text); min-height: 38px; }
:where(select, input[type=date], input[type=time]):focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.dp-head select, .dp-head input[type=search], .dp-mobile select, .field input:not([type]), .field input[type=url], .field input[type=search], .field input[type=datetime-local], .st-lang [data-lang-pane] > textarea, .field input[type=text], .field input[type=tel], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=time], .field input[type=date], .field select, .field textarea {
    font: inherit;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
    color: var(--text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-strong); }
.readonly-value { padding: 11px 14px; border-radius: 11px; background: var(--surface-2); border: 1px dashed var(--border); font-weight: 600; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.check input, .check-list input { width: 18px; height: 18px; accent-color: var(--primary); }
.check.check-sm { margin-top: 8px; gap: 8px; font-size: 13.5px; color: var(--muted); align-items: flex-start; }
.check.check-sm input { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.check.check-sm:has(input:checked) { color: var(--text); }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.check-list label {
    border: 1px solid var(--border); border-radius: 11px; padding: 11px 14px;
    display: flex; gap: 10px; align-items: center; cursor: pointer; background: var(--surface-2);
    transition: border-color var(--t-fast), background var(--t-fast);
}
.check-list label:hover { border-color: var(--primary); }
.check-list label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 20px; }

/* ---------- Alerts / badges ---------- */
.alert {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 16px; border-radius: 12px; margin-bottom: 20px; font-weight: 600;
    animation: slideDown .4s var(--ease);
    transition: opacity var(--t), transform var(--t), margin var(--t), padding var(--t), max-height var(--t);
    max-height: 120px; overflow: hidden;
}
.alert.hide { opacity: 0; transform: translateY(-6px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; }
.alert-close { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.alert-close:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } }
/* Toast — sahifa xabarlari o'ng yuqori burchakda (telefonda — tepada, to'liq kenglikda) */
.toast-stack { position: fixed; top: 76px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px;
    width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast-stack .alert { margin: 0; pointer-events: auto; max-height: 240px; box-shadow: 0 10px 30px rgba(15, 30, 60, .18);
    border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 25%, transparent); animation: toastIn .35s var(--ease); }
.toast-stack .alert.hide { transform: translateX(12px); }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } }
@media (max-width: 640px) { .toast-stack { top: 12px; right: 16px; left: 16px; width: auto; } }
@media print { .toast-stack { display: none; } }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--primary-soft); color: var(--primary); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warning-soft); color: var(--warning); }
.badge-off { background: var(--surface-2); color: var(--muted); }
.badge-role { background: var(--primary-soft); color: var(--primary); }
.badge-role::before { display: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; padding: 6px 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
tbody tr { transition: background var(--t-fast); }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
td.wrap { white-space: normal; }

/* ---------- Hotel cards (bosh sahifa) ---------- */
.hotel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.hotel-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 12px;
    color: var(--text);
    transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t);
}
.hotel-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: var(--primary-grad); opacity: .85;
}
.hotel-card:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.hotel-card h3 { margin: 4px 0 0; font-size: 18px; font-weight: 700; }
.hotel-card .arrow { position: absolute; right: 20px; top: 24px; color: var(--muted); transition: transform var(--t) var(--ease), color var(--t); }
.hotel-card:hover .arrow { transform: translateX(4px); color: var(--primary); }
.hotel-meta { color: var(--muted); font-size: 14px; display: flex; gap: 6px 14px; flex-wrap: wrap; }
/* Меҳмонхоналар картаси: охирги синхрон (яшил — янги, сариқ — кечикяпти, қизил — эскирган, «Жонли» — Revora PMS) */
.hotel-sync { margin-top: 8px; font-size: 13px; }
.hotel-sync-link { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.hotel-sync-link:hover, .hotel-sync-link:focus-visible { text-decoration: underline; }
.hotel-sync-link .sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.hotel-sync-link.sync-fresh, .hotel-sync-link.sync-live { color: var(--success); background: var(--success-soft); }
.hotel-sync-link.sync-fresh .sync-dot, .hotel-sync-link.sync-live .sync-dot { background: var(--success); }
.hotel-sync-link.sync-live { cursor: default; }
.hotel-sync-link.sync-stale { color: var(--warning); background: var(--warning-soft); }
.hotel-sync-link.sync-stale .sync-dot { background: var(--amber); }
.hotel-sync-link.sync-old { color: var(--danger); background: var(--danger-soft); }
.hotel-sync-link.sync-old .sync-dot { background: var(--danger); }
.hotel-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 2px; }
.hotel-stats .k { color: var(--muted); font-size: 12px; font-weight: 600; }
.hotel-stats .v { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.hotel-stats .sub { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* Progress (bandlik) chizig'i — kenglik JS orqali 0 dan to'ladi */
.meter { height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin-top: 8px; }
.meter-fill { height: 100%; width: 0; border-radius: inherit; background: var(--primary-grad); transition: width 1.1s var(--ease); }
.meter-fill.warn { background: linear-gradient(90deg, #f5b544, #f08c2e); }
.meter-fill.good { background: linear-gradient(90deg, #34c48a, #16a061); }

.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.empty-icon svg { width: 28px; height: 28px; }
.empty strong { color: var(--text); font-size: 17px; }

/* ---------- Hotel KPI page ---------- */
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 6px 0 14px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.stats-grid.stats-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* "Бугун": bir kunlik asosiy ko'rsatkichlar — ikki ustunli kartochka ichida uchta qiymat */
.stat-wide { grid-column: span 2; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.trio-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.trio-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.trio .stat-value { font-size: 22px; }
.stat-value.v-bad { color: var(--danger); }
.stat-value.v-good { color: var(--success); }

/* Saralanadigan jadval sarlavhalari */
.sort-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; white-space: nowrap; }
.sort-link:hover { color: var(--text); }
.sort-link.active { color: var(--primary); }
.sort-arrow { font-size: 11px; opacity: .45; }
.sort-link.active .sort-arrow { opacity: 1; }
th.num .sort-link { justify-content: flex-end; width: 100%; }
/* Brauzerda saralanadigan ustun (app.js — jadval saralash) */
th.th-sort { cursor: pointer; user-select: none; }
th.th-sort:hover, th.th-sort:focus-visible { color: var(--text); }
th.th-sort .sort-arrow { margin-left: 4px; }
th.th-sort[aria-sort="ascending"], th.th-sort[aria-sort="descending"] { color: var(--primary); }
th.th-sort[aria-sort="ascending"] .sort-arrow, th.th-sort[aria-sort="descending"] .sort-arrow { opacity: 1; }
.inv-numbers { margin-top: 3px; font-size: 12px; max-width: 220px; white-space: normal; overflow-wrap: anywhere; }
.stat {
    position: relative;
    display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
    transition: transform var(--t) var(--ease), box-shadow var(--t);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 18px; height: 18px; }
.i-blue { background: var(--primary-soft); color: var(--primary); }
.i-green { background: var(--success-soft); color: var(--success); }
.i-violet { background: color-mix(in srgb, var(--violet) 14%, transparent); color: var(--violet); }
.i-amber { background: var(--warning-soft); color: var(--warning); }
.i-red { background: var(--danger-soft); color: var(--danger); }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.03em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 12.5px; }
.stat-alert { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: linear-gradient(180deg, var(--danger-soft), var(--surface) 70%); }
.stat-alert .stat-value { color: var(--danger); }

.delta { display: inline-flex; align-items: center; gap: 4px; width: fit-content; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.delta.up { color: var(--success); background: var(--success-soft); }
.delta.up::before { content: "↑"; }
.delta.down { color: var(--danger); background: var(--danger-soft); }
.delta.down::before { content: "↓"; }

.period-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.segmented {
    position: relative;
    display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 13px;
    padding: 4px; gap: 2px; flex-wrap: wrap; box-shadow: var(--shadow-sm);
}
.segmented a {
    position: relative; z-index: 1;
    padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap;
    transition: color var(--t), background var(--t);
}
.segmented a:hover { color: var(--text); background: var(--surface-2); }
.segmented a.active { color: #fff; background: var(--primary-grad); box-shadow: 0 3px 10px rgba(47, 91, 234, .3); }
.custom-period { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.custom-period input[type=date] {
    font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--text); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.custom-period input[type=date]:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
/* Hisobot filtrlari (kontragent, kanal, holat, xona turi) — davr qatori ostida. */
.report-filters { display: flex; align-items: flex-end; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 10px; }
.report-filter { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; min-width: 0; }
.report-filter select {
    font: inherit; font-size: 14px; font-weight: 500; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--text); max-width: 260px; min-width: 150px;
}
.report-filter select.active { border-color: var(--primary); box-shadow: var(--ring); }
.report-filter select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
@media (max-width: 640px) {
    .report-filter { flex: 1 1 140px; }
    .report-filter select { max-width: none; width: 100%; min-width: 0; }
}
.period-caption { color: var(--muted); font-size: 14px; margin: 0 0 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.period-caption strong { color: var(--text); }

.chart-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.card-title { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.chart-box { position: relative; height: 320px; }
.chart-box-sm { height: 200px; margin-bottom: 14px; }
table.compact td { padding: 8px 4px; font-size: 14px; }
table.compact tr:hover { background: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 10px; vertical-align: middle; }
/* Savdo kanallari: tor kartada ham raqamlar karta ichida qoladi — uzun nom keyingi qatorga o'tadi (telefonda ham to'liq ko'rinadi). */
.source-table { table-layout: fixed; width: 100%; }
.source-table .col-pct { width: 58px; }
.source-table .col-sum { width: 104px; }
.source-table td { vertical-align: top; }
.source-table td.source-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; padding-left: 20px; text-indent: -20px; }
.source-table td.num { padding-left: 6px; }

/* ---------- Izoh (ⓘ) ---------- */
.tip {
    display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; padding: 0;
    border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted);
    font: italic 700 11px/1 Georgia, serif; cursor: pointer; vertical-align: 1px; flex: none;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.tip:hover, .tip[aria-expanded="true"] { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.tip:focus-visible { outline: none; box-shadow: var(--ring); }
/* Telefonda barmoq bilan bosish uchun kattaroq maydon (ko'rinishi o'zgarmaydi). */
@media (pointer: coarse) { .tip { position: relative; } .tip::after { content: ""; position: absolute; inset: -12px; } }
.tip-pop {
    position: fixed; z-index: 1000; max-width: min(300px, calc(100vw - 24px)); padding: 10px 12px; border-radius: 10px;
    background: var(--text); color: var(--surface); font-size: 13px; line-height: 1.5; white-space: pre-line;
    box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-4px); pointer-events: none;
    transition: opacity var(--t-fast), transform var(--t-fast);
}
.tip-pop.show { opacity: 1; transform: none; }

/* ---------- Exely: yo'riqnoma va sinxronlash holati ---------- */
.field-wide { grid-column: 1 / -1; }
.howto {
    border: 1px dashed var(--border-strong); border-radius: 12px; padding: 12px 16px; background: var(--surface-2);
    font-size: 14px; color: var(--muted);
}
.howto summary { cursor: pointer; font-weight: 600; color: var(--primary); list-style: none; display: flex; align-items: center; gap: 8px; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before { content: "›"; font-size: 18px; line-height: 1; transition: transform var(--t) var(--ease); }
.howto[open] summary::before { transform: rotate(90deg); }
.howto ol { margin: 12px 0 8px; padding-left: 22px; display: grid; gap: 6px; }
.howto b { color: var(--text); font-weight: 600; }
.howto p { margin: 6px 0 0; }

/* Integratsiya usullari (admin forma) */
.integration-option { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; display: grid; gap: 12px; background: var(--surface-2); }
.integration-option.recommended { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); background: linear-gradient(180deg, var(--success-soft), var(--surface) 60%); }
.integration-option > .hint { margin: 0; }
.option-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.option-title { font-weight: 700; }
details.integration-option > summary { list-style: none; cursor: pointer; }
details.integration-option > summary::-webkit-details-marker { display: none; }
details.integration-option > summary .option-title::before { content: "›"; display: inline-block; margin-right: 8px; transition: transform var(--t) var(--ease); }
details.integration-option[open] > summary .option-title::before { transform: rotate(90deg); }
details.integration-option:not([open]) { gap: 0; }

.sync-card { margin-top: 18px; }
.sync-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sync-head .card-title { margin-bottom: 0; }
.sync-head .subtitle { margin-top: 4px; font-size: 14px; }
.sync-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
.sync-meta div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 10px 14px; }
.sync-meta dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.sync-meta dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.text-danger { color: var(--danger); }
.archive { margin-top: 18px; }
.archive-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.archive-title .muted { font-weight: 500; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.archive-item {
    display: grid; gap: 2px; padding: 10px 12px; border-radius: 11px; background: var(--surface-2);
    border: 1px solid var(--border); transition: border-color var(--t-fast), transform var(--t-fast);
}
.archive-item:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.archive-item b { font-size: 17px; font-variant-numeric: tabular-nums; }
.archive-item span { font-size: 12.5px; color: var(--muted); }
a.archive-item { color: var(--text); cursor: pointer; }
a.archive-item:hover { color: var(--text); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ---------- Exely xom ma'lumotlari ---------- */
.kind-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: thin; }
.kind-tab {
    flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600;
    transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.kind-tab b { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.kind-tab:hover { color: var(--text); border-color: var(--border-strong); }
.kind-tab.active { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.kind-tab.active b { background: var(--surface); color: var(--primary); }
.raw-table td { font-size: 13.5px; padding: 9px 10px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.raw-table th { white-space: nowrap; }
.raw-table th.num, .raw-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.raw-row { cursor: pointer; transition: background var(--t-fast); }
.raw-row:hover, .raw-row.open { background: var(--surface-2); }
.raw-row.open td { font-weight: 600; }
.raw-detail td { white-space: normal; max-width: none; background: var(--surface-2); padding: 0 12px 14px; }
.raw-meta { font-size: 12.5px; padding: 6px 0; }
.raw-json {
    margin: 0; max-height: 420px; overflow: auto; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); font: 12.5px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre;
}
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0 8px; }
.pager .disabled { pointer-events: none; opacity: .45; }
.pager-info { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.verify { margin-top: 18px; }
.verify-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.verify-head .archive-title { margin: 0; }
.verify-list { display: grid; gap: 6px; }
.verify-item { border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
.verify-item summary {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 9px 12px; cursor: pointer; list-style: none; font-size: 14px;
}
.verify-item summary::-webkit-details-marker { display: none; }
.verify-item .muted { font-size: 13px; }
.verify-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; align-self: center; background: var(--success); }
.verify-item.bad { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.verify-alert { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.verify-alert .card-title { color: var(--danger); margin: 0; }
a.badge { text-decoration: none; }
.verify-item.bad .verify-dot { background: var(--danger); }
.verify-item ul { margin: 0; padding: 0 14px 10px 32px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.verify-item li { margin: 2px 0; }
.verify .hint { display: block; margin-top: 8px; }
.sync-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.push-right { margin-left: auto; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.spinner {
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: spin .8s linear infinite;
}
.badge:has(.spinner)::before { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.note { font-size: 12.5px; color: var(--muted); font-style: italic; }

/* ---------- Profil va Telegram ---------- */
.user-link { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); padding: 4px 10px 4px 4px; border-radius: 999px; transition: background var(--t-fast), color var(--t-fast); }
.user-link:hover, .user-link.active { background: var(--surface-2); color: var(--text); }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.profile-head, .tg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-head .card-title, .tg-head .card-title { margin: 0 0 4px; }
.avatar-lg { width: 54px; height: 54px; font-size: 22px; }
.info-list { display: grid; gap: 10px; margin: 0; }
.info-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-list div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); font-size: 14px; }
.info-list dd { margin: 0; font-weight: 600; text-align: right; }
.muted { color: var(--muted); }

.tg-card { display: flex; flex-direction: column; gap: 14px; }
.tg-card .tg-head { margin-bottom: 4px; }
.tg-logo {
    width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #37aee2, #1e96c8); color: #fff;
    box-shadow: 0 6px 18px rgba(30, 150, 200, .35);
}
.tg-logo svg { width: 28px; height: 28px; margin-left: -2px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feature-list li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 10px 14px; font-size: 14px; }
.btn-telegram { background: linear-gradient(135deg, #37aee2, #1e96c8); color: #fff; box-shadow: 0 4px 14px rgba(30, 150, 200, .32); }
.btn-telegram:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30, 150, 200, .42); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.switch-title { font-weight: 600; }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: var(--border-strong); border-radius: 999px; transition: background var(--t) var(--ease); }
.switch .slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--t) var(--ease); }
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { box-shadow: var(--ring); }
code { font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }

/* ---------- Profil: tugmalar va modal oynalar ---------- */
.profile-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.profile-actions .btn { width: 100%; }

.modal {
    width: min(460px, calc(100vw - 32px));
    max-height: calc(var(--vh, 1vh) * 100 - 32px);
    max-height: calc(var(--vh, 1vh) * 100 - 32px);   /* telefonda manzil satri hisobga olinadi */
    padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
    overflow: auto;
}
.modal[open] { animation: modalIn .16s var(--ease); }
.modal::backdrop { background: rgba(13, 17, 27, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fadeIn .14s ease; }
.modal.closing { animation: modalOut .12s ease forwards; }
.modal.closing::backdrop { animation: fadeOut .12s ease forwards; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal .form { padding: 22px 24px 24px; gap: 16px; }
.modal .alert { margin-bottom: 0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 19px; font-weight: 800; }
.modal-close {
    width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--muted);
    font-size: 22px; line-height: 1; cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
}
.modal-close:hover { background: var(--danger-soft); color: var(--danger); }
.modal .form-actions { margin-top: 2px; }

/* Qarz tafsiloti oynasi (Hisob-fakturalar) */
.modal.modal-wide { width: min(640px, calc(100vw - 24px)); }
.modal-wide > .modal-head { padding: 20px 22px 0; }
.modal-wide [data-detail-body] { padding: 14px 22px 22px; }
.debt-link {
    font: inherit; font-weight: 700; color: var(--danger); background: none; border: 0; padding: 2px 4px; margin: -2px -4px;
    border-radius: 6px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; white-space: nowrap;
    transition: background var(--t-fast);
}
.debt-link:hover, .debt-link:focus-visible { background: var(--danger-soft); outline: none; }
/* Bron bo'yicha guruhlangan jadval */
.rooms-toggle {
    font: inherit; font-size: 13px; font-weight: 700; color: var(--primary); background: var(--primary-soft);
    border: 0; border-radius: 999px; padding: 3px 10px; cursor: pointer; white-space: nowrap;
    transition: filter var(--t-fast);
}
.rooms-toggle:hover { filter: brightness(.96); }
.booking-group.open .booking-row td { background: var(--surface-2); }
/* Uzun matn (masalan, guruh to'lovchilari) qatorni cho'zsa ham — mazmun yuqorida, bo'sh joy pastda emas o'rtada qolmasin. */
.inv-table td { vertical-align: top; }
.inv-table .inv-numbers { white-space: nowrap; max-width: none; }
.stay-row td { background: var(--surface-2); font-size: 13px; padding-top: 8px; padding-bottom: 8px; }
.stay-row .stay-indent { padding-left: 22px; white-space: nowrap; }
.inv-table td .badge + .badge { margin-left: 4px; }
.stay-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.stay-guest { font-size: 17px; font-weight: 700; }
.stay-head .muted { font-size: 13px; margin-top: 2px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.detail-table th, .detail-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); white-space: normal; text-transform: none; letter-spacing: 0; }
.detail-table thead th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.detail-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.detail-table tfoot th, .detail-table tfoot td { border-bottom: 0; color: var(--text); font-size: 14px; }
.detail-table tfoot tr:first-child > * { border-top: 2px solid var(--border-strong); }
.detail-table .debt-row > * { font-size: 15px; }
.detail-sub { margin: 18px 0 6px; font-size: 14px; font-weight: 700; }
.stay-detail .note { margin-top: 8px; }

.password-wrap { position: relative; display: flex; }
.password-wrap input { flex: 1; padding-right: 44px !important; }
.pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: none; cursor: pointer; font-size: 16px; padding: 4px 6px; border-radius: 6px;
    opacity: .55; transition: opacity var(--t-fast), background var(--t-fast);
}
.pw-toggle:hover, .pw-toggle.on { opacity: 1; background: var(--surface-2); }
.field .meter { margin-top: 2px; }
.field .hint.text-danger { color: var(--danger); font-weight: 600; }
.meter-fill.weak { background: linear-gradient(90deg, #f07a6b, #dc3c3c); }

@media (max-width: 420px) {
    .profile-actions { grid-template-columns: 1fr; }
    .modal .form { padding: 18px 16px 18px; }
}

/* ---------- Qarzdorlik hisoboti ---------- */
.back-link { display: inline-block; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.back-link:hover { color: var(--primary); }
@media (max-width: 767px) {
    .back-link { min-height: 44px; display: inline-flex; align-items: center; margin-bottom: 0; }
}
.stat-link { color: var(--text); cursor: pointer; }
.stat-link:hover { color: var(--text); }
.stat-link.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow); }
.stat-warn { border-color: color-mix(in srgb, var(--warning) 35%, var(--border)); background: linear-gradient(180deg, var(--warning-soft), var(--surface) 70%); }
.stat-more { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--danger); opacity: 0; transform: translateX(-4px); transition: opacity var(--t), transform var(--t) var(--ease); }
.stat-link:hover .stat-more, .stat-link:focus-visible .stat-more { opacity: 1; transform: none; }

.aging-card { margin-bottom: 20px; }
.aging-card .card-title .muted { font-weight: 500; font-size: 14px; }
.aging-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.aging-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); }
.aging-pct { color: var(--text); }
.aging-sum { margin-top: 6px; font-size: 15px; }

.debt-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
/* Filtrdagi ochiladigan menyular (masalan «Ҳолатлар») keyingi bloklar (.reveal — o'z qatlami) ustida turishi uchun. */
.debt-filter { position: relative; z-index: 20; }
.search-wrap { position: relative; flex: 1; min-width: 220px; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); }
.search-wrap input, .debt-filter select {
    width: 100%; font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px;
    background: var(--surface); color: var(--text); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-wrap input { padding-left: 38px; }
.debt-filter select { width: auto; }
.search-wrap input:focus, .debt-filter select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.table-caption { margin: 6px 6px 10px; color: var(--muted); font-size: 14px; }
.table-caption b { color: var(--text); }
.debt-table td { font-size: 14px; padding: 11px 12px; }
.debt-table .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; color: var(--muted); }
.debt-table th.num, .debt-table td.num { text-align: right; }
/* ЭСФ харидори → 1С контрагенти: номзодлар устма-уст, пастда — бошқасини ёзиб топиш. */
.buyer-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.buyer-pick .inline-form input[type=text] { min-width: 240px; }
/* ЭСФ рўйхати: ҳолатларни кўрсатиш / яшириш (очиладиган рўйхат). */
.status-pick { position: relative; }
.status-pick > summary { list-style: none; cursor: pointer; }
.status-pick > summary::-webkit-details-marker { display: none; }
.status-pick-menu { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; min-width: 260px; max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
    padding: 12px; background: var(--surface, #fff); border: 1px solid var(--border, #e3e6ee); border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); }
.status-pick-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.debt-cell { color: var(--danger); font-weight: 700; }

@media (max-width: 960px) {
    .aging-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Tor ekranda ikkinchi darajali ustunlar yashiriladi — "Qarz" doim ko'rinib tursin. */
@media (max-width: 1100px) {
    .debt-table .col-source, .debt-table .col-paid { display: none; }
}
@media (max-width: 760px) {
    .debt-table .col-total { display: none; }
    .debt-table td, .debt-table th { padding: 9px 8px; }
}

/* Korxona hisoblari: qator bosilsa — yashashlar ro'yxati */
.company-table .row-chevron {
    display: inline-block; width: 14px; color: var(--muted); font-weight: 700;
    transition: transform var(--t-fast);
}
.company-table .raw-row.open .row-chevron { transform: rotate(90deg); }
.company-table .raw-row .muted { font-weight: 400; margin-left: 14px; font-size: 12.5px; }
.company-table .raw-detail > td { padding: 4px 12px 14px 26px; }
.company-stays { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; }
.company-stays th, .company-stays td {
    background: transparent; padding: 7px 10px; font-size: 13px; border-bottom: 1px solid var(--border); text-align: left;
}
.company-stays th { color: var(--muted); font-weight: 600; font-size: 12px; }
.company-stays th.num, .company-stays td.num { text-align: right; font-variant-numeric: tabular-nums; }
.company-stays tr:last-child td { border-bottom: 0; }
.company-sum { font-size: 12.5px; margin: 8px 0 0; }
@media (prefers-reduced-motion: reduce) {
    .company-table .row-chevron { transition: none; }
}

/* ---------- AI tahlil ---------- */
.ai-card { margin-bottom: 20px; position: relative; overflow: hidden; }
.ai-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--violet), var(--accent), var(--primary));
    background-size: 300% 100%; opacity: .7;
}
.ai-card.busy::before { opacity: 1; animation: ai-flow 2.4s linear infinite; }
@keyframes ai-flow { to { background-position: -300% 0; } }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ai-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ai-title .card-title { margin: 0; }
.ai-sub { margin: 2px 0 0; font-size: 13.5px; }
.ai-icon {
    flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    box-shadow: 0 4px 14px color-mix(in srgb, var(--violet) 35%, transparent);
}
.ai-icon svg { width: 21px; height: 21px; }
.btn-ai { color: #fff; border: 0; background: linear-gradient(135deg, var(--primary), var(--violet)); box-shadow: var(--shadow-sm); }
.btn-ai:hover { color: #fff; filter: brightness(1.08); }
.btn-ai:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.ai-card.busy .btn-ai svg { animation: spin 1.4s linear infinite; }
.ai-body { margin-top: 14px; }
.ai-note { margin: 0; font-size: 13.5px; }
.ai-note code { font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.ai-error { margin: 0; padding: 12px 14px; border-radius: 11px; background: var(--danger-soft); color: var(--danger); font-size: 14px; }

.ai-loading p { margin: 10px 0 14px; font-size: 14px; }
.ai-dots { display: flex; gap: 6px; }
.ai-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); animation: ai-bounce 1.2s ease-in-out infinite; }
.ai-dots span:nth-child(2) { animation-delay: .15s; background: var(--primary); }
.ai-dots span:nth-child(3) { animation-delay: .3s; background: var(--accent); }
@keyframes ai-bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.ai-skeleton { display: grid; gap: 9px; }
.ai-skeleton i {
    display: block; height: 11px; border-radius: 6px;
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
    background-size: 200% 100%; animation: ai-shimmer 1.4s ease-in-out infinite;
}
.ai-skeleton i:nth-child(1) { width: 92%; }
.ai-skeleton i:nth-child(2) { width: 78%; }
.ai-skeleton i:nth-child(3) { width: 85%; }
.ai-skeleton i:nth-child(4) { width: 55%; }
@keyframes ai-shimmer { to { background-position: -200% 0; } }

.ai-result { font-size: 14.5px; line-height: 1.65; animation: ai-in .45s var(--ease) both; }
@keyframes ai-in { from { opacity: 0; transform: translateY(6px); } }
.ai-result h4 { margin: 18px 0 6px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ai-result h4::before { content: ""; flex: none; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(180deg, var(--primary), var(--violet)); }
.ai-result h4:first-child { margin-top: 0; }
.ai-result p { margin: 0 0 8px; }
.ai-result ul { margin: 0 0 8px; padding-left: 20px; }
.ai-result li { margin: 4px 0; }
.ai-result li::marker { color: var(--primary); }
.ai-warning { padding: 10px 14px; border-radius: 11px; background: var(--warning-soft); color: var(--warning); font-size: 13.5px; }
.ai-result .ai-points { list-style: none; padding: 0; display: grid; gap: 8px; }
.ai-points li {
    margin: 0; padding: 10px 14px; border-radius: 11px; background: var(--surface-2);
    border-left: 4px solid var(--border-strong); display: grid; gap: 2px;
}
.ai-points li.lvl-high { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 60%, var(--surface)); }
.ai-points li.lvl-medium { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning-soft) 55%, var(--surface)); }
.ai-points li span { color: var(--muted); font-size: 14px; }
.ai-actions { padding-left: 22px; }
.ai-actions li { padding-left: 4px; }
.ai-actions li::marker { font-weight: 700; }
.ai-who {
    display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: var(--primary-soft); color: var(--primary); vertical-align: 1px;
}
.ai-priorities { display: grid; gap: 8px; }
.ai-prio {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.ai-prio:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.ai-rank {
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px;
    color: #fff; background: linear-gradient(135deg, var(--primary), var(--violet));
}
.ai-prio-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ai-prio-top .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; color: var(--muted); }
.ai-prio-reason { font-size: 13px; line-height: 1.45; }
.ai-prio-sum { text-align: right; display: grid; font-size: 14px; }
.ai-prio-sum .muted { font-size: 12px; }
@media (max-width: 560px) {
    .ai-head .btn-ai { width: 100%; justify-content: center; }
    .ai-prio { grid-template-columns: auto minmax(0, 1fr); }
    .ai-prio-sum { grid-column: 2; text-align: left; }
}

/* ---------- Xato sahifasi ---------- */
.error-card { text-align: center; }
.error-code {
    font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -.04em;
    background: var(--primary-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 10px;
}
.error-title { font-size: 21px; margin: 0 0 6px; }
.error-card .subtitle { display: block; margin-bottom: 24px; }

/* ---------- Login ---------- */
.login-page {
    min-height: 100vh; min-height: calc(var(--vh, 1vh) * 100); display: flex; align-items: center; justify-content: center; padding: 16px;
    position: relative; overflow: hidden;
}
.login-page::before, .login-page::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 0;
    animation: float 14s ease-in-out infinite;
}
.login-page::before { width: 420px; height: 420px; background: #38bdf8; top: -120px; right: -80px; }
.login-page::after { width: 360px; height: 360px; background: #1e3a8a; bottom: -120px; left: -80px; animation-delay: -7s; }
@keyframes float { 50% { transform: translate(30px, 24px) scale(1.06); } }
.login-card {
    position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 34px 30px;
    background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    box-shadow: var(--shadow-lg); border-radius: var(--radius-lg);
}
.login-card .brand { justify-content: center; margin-bottom: 6px; font-size: 24px; }
.login-card .subtitle { justify-content: center; margin-bottom: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .topbar { padding: 10px 16px; gap: 10px; height: auto; flex-wrap: wrap; justify-content: space-between; }
    .nav { order: 3; flex-basis: 100%; flex-wrap: wrap; }   /* menyular ochilishi uchun — surilmaydi (bandlar kam) */
    .chart-grid { grid-template-columns: 1fr; }
    .stats-grid, .stats-grid.stats-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .container { padding: 22px 16px 56px; }
    .page-head h1 { font-size: 23px; }
    .form-grid { grid-template-columns: 1fr; }
    .sync-meta { grid-template-columns: 1fr; }
    .push-right { margin-left: 0; }
    .stat { padding: 15px 16px; }
    .stat-value { font-size: 21px; }
    .user-box .name { display: none; }
    .period-bar { flex-direction: column; align-items: stretch; }
    .segmented { overflow-x: auto; flex-wrap: nowrap; }
}

@media (max-width: 420px) {
    .trio { gap: 8px; }
    .trio .stat-value { font-size: 16px; }
    .trio-label { font-size: 11.5px; }
    .stats-grid { gap: 10px; }
    .stat { padding: 13px 13px; }
    .stat-value { font-size: 18px; }
    .stat-label { font-size: 12px; }
    .stat-icon { width: 28px; height: 28px; border-radius: 8px; }
    .stat-icon svg { width: 15px; height: 15px; }
    .stat-sub { font-size: 11.5px; }
    .head-actions { width: 100%; }
    .head-actions > * { flex: 1; }
    .head-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal, .stagger > * { opacity: 1; transform: none; }
}

/* ---------- Daromad va tushum / jami ---------- */
.flow-card { margin-bottom: 28px; }
.flow-card .card-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow-card .card-title .muted { font-weight: 600; font-size: 13px; }
.flow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px 0; }
.flow-item { min-width: 0; padding: 0 16px; border-left: 1px solid var(--border); }
.flow-item:first-child { border-left: 0; padding-left: 0; }
.flow-item .k { color: var(--muted); font-size: 13px; font-weight: 600; }
.flow-item .v { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.flow-item .sub { color: var(--muted); font-size: 12.5px; }
.flow-item.gap-pos .v { color: var(--warning); }
.flow-item.gap-neg .v { color: var(--success); }
@media (max-width: 720px) {
    .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .flow-item { border-left: 0; padding: 0; }
    .flow-item .v { font-size: 18px; }
}

/* ---------- Topshiriqlar ---------- */
.container-narrow { max-width: 860px; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.form-actions-start { justify-content: flex-start; border-top: 0; padding-top: 0; }
.inline-form { margin-bottom: 14px; }
.task-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.task-toolbar .kind-tabs { margin-bottom: 0; }
.kind-tab b.tab-alert { background: var(--danger); color: #fff; }
.task-table td { vertical-align: top; }
.task-table .wrap { white-space: normal; overflow-wrap: break-word; }
.task-table td:nth-child(2) { min-width: 240px; }
.task-link { font-weight: 700; color: var(--text); }
.task-link:hover { color: var(--primary); }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; margin-top: 3px; }
.task-row.overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.task-due { font-size: 12px; font-weight: 700; color: var(--danger); }
.task-due.soon { color: var(--warning); }
.task-title { overflow-wrap: anywhere; }
.task-title .muted { font-weight: 600; }
.page-head .subtitle .badge { margin-right: 6px; }
.task-desc { white-space: pre-line; margin: 0 0 16px; }
.task-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 20px; margin: 0; }
.task-facts dt { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.task-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.container-narrow section.card + section.card { margin-top: 16px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 16px 6px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--border-strong); }
.timeline li.ev-created::before, .timeline li.ev-started::before { border-color: var(--primary); }
.timeline li.ev-completed::before, .timeline li.ev-accepted::before { border-color: var(--success); background: var(--success); }
.timeline li.ev-returned::before, .timeline li.ev-cancelled::before { border-color: var(--danger); }
.timeline li.ev-reminded::before { border-color: var(--warning); }
.tl-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.tl-time { font-size: 12.5px; }
.tl-comment { margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); white-space: pre-line; overflow-wrap: anywhere; }
.tl-form { margin-top: 8px; }
.btn-task {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 700;
}
.btn-task:hover { border-color: var(--primary); background: var(--primary-soft); }
.ai-actions li .btn-task { display: flex; width: fit-content; }
@media (max-width: 720px) {
    .task-table thead { display: none; }
    .task-table tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
    .task-table td { padding: 0; border: 0; }
    .task-table td:nth-child(n+3) { grid-column: 2; font-size: 13px; }
}
.field textarea { font: inherit; resize: vertical; min-height: 64px; line-height: 1.45; }

/* ---------- Topshiriq ilovasi ---------- */
.btn-task-list { font-weight: 600; color: var(--muted); }
.task-attach { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 13.5px; font-weight: 600; }
.items-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.items-head .card-title { margin-bottom: 2px; }
.items-sub { margin: 0; font-size: 13px; }
.items-head .meter { max-width: 320px; }
.items-wrap { padding: 0; max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; margin-top: 10px; }
.items-table td { vertical-align: top; }
.items-table .wrap { white-space: normal; overflow-wrap: break-word; min-width: 140px; }
.items-table tr.item-done td { color: var(--muted); }
.items-table tr.item-done td:not(:first-child) { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.tick { border: 0; background: none; cursor: pointer; font-size: 20px; line-height: 1; padding: 2px 4px; color: var(--primary); }
.tick-static { font-size: 18px; color: var(--muted); }
.task-items-badge { display: inline-block; margin-left: 4px; font-size: 12px; font-weight: 700; color: var(--primary); }
.items-table .items-paid { justify-content: flex-end; white-space: nowrap; }

/* ---------- Bo'limlar va xodimlar ---------- */
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.dept-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.dept-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.dept-rename { display: flex; gap: 8px; flex: 1 1 260px; min-width: 0; }
.dept-rename input, .dept-add input { flex: 1; min-width: 0; font: inherit; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); }
.dept-count { font-size: 13px; white-space: nowrap; }
.dept-add { display: flex; gap: 8px; flex-wrap: wrap; }
.dept-add input { flex: 1 1 220px; }
.dept-pick { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; }
.dept-pick legend { font-weight: 700; padding: 0 6px; }
.dept-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dept-chip { display: inline-flex; padding: 2px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.dept-intro { margin: 4px 0 0; max-width: 620px; }

/* ---------- Hisobotlar ekrani (mehmonxona sahifasi): bloklar ---------- */
.ws { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
.ws-block { grid-column: 1 / -1; min-width: 0; position: relative; }
.ws-block.ws-wide { grid-column: span 2; }
.ws-block.ws-narrow { grid-column: span 1; }
.ws-card { margin-bottom: 28px; }
.ws-edit-bar { display: none; }
.ws-toolbar {
    position: sticky; top: 8px; z-index: 40; display: flex; gap: 12px; align-items: center; justify-content: space-between;
    flex-wrap: wrap; padding: 12px 14px; margin-bottom: 18px; border-radius: 14px;
    background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--primary); box-shadow: var(--shadow-lg);
}
.ws-toolbar[hidden] { display: none; }
.ws-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-toolbar-actions form { margin: 0; }
body.ws-editing .ws-block {
    border: 2px dashed var(--border-strong); border-radius: 16px; padding: 10px 10px 0; margin-bottom: 14px;
    transition: border-color var(--t-fast), opacity var(--t-fast), transform var(--t-fast);
}
body.ws-editing .ws-block:hover { border-color: var(--primary); }
body.ws-editing .ws-edit-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
body.ws-editing .ws-block .reveal, body.ws-editing .ws-block .stagger > * { opacity: 1 !important; transform: none !important; }
.ws-handle { cursor: grab; color: var(--muted); font-weight: 800; letter-spacing: -2px; padding: 0 6px; user-select: none; }
.ws-edit-title { flex: 1; font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-btn {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font: 700 15px/1 inherit; cursor: pointer;
}
.ws-btn:hover { border-color: var(--primary); color: var(--primary); }
.ws-btn.ws-remove:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.ws-dragging { opacity: .45; }
.ws-moved { border-color: var(--primary) !important; box-shadow: var(--ring); }
.ws-removing { opacity: 0; transform: scale(.97); }

/* Jadval blok */
.report-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.report-card-head .card-title { margin-bottom: 0; }
.report-card-sub { margin: 2px 0 0; font-size: 12.5px; }
.report-card-actions { display: flex; gap: 6px; }

/* Hisobot qo'shish oynasi */
#addReportModal { width: min(860px, calc(100vw - 24px)); }
.add-report-groups { padding: 14px 22px 22px; display: grid; gap: 18px; max-height: calc(var(--vh, 1vh) * 70); overflow: auto; }
.add-report-group h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.add-report-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.add-report-group li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 12px; }
.add-report-group li > div { display: grid; gap: 2px; min-width: 0; }
.add-report-group li .muted { font-size: 12.5px; }
.add-report-group li form { margin: 0; flex: none; }
.add-report-group li.unavailable { opacity: .6; }

/* ---------- Hisobot jadvali ---------- */
.report-scroll { padding: 0; overflow-x: auto; }
table.rt th { font-size: 11.5px; padding: 10px 12px; position: sticky; top: 0; background: var(--surface); }
table.rt td { font-size: 13.5px; padding: 8px 12px; }
table.rt th.num { text-align: right; }
table.rt tr.rt-section td { background: var(--surface-2); font-weight: 700; color: var(--text); }
table.rt tr.rt-subtotal td { font-weight: 700; border-top: 1px solid var(--border-strong); }
table.rt tr.rt-group { cursor: pointer; }
table.rt tr.rt-group td { font-weight: 700; }
table.rt tr.rt-group:hover td { background: var(--surface-2); }
table.rt tr.rt-child[hidden] { display: none; }
table.rt tr.rt-child td:first-child { padding-left: 40px; color: var(--muted); }
table.rt tr.rt-child td { font-size: .95em; }
.rt-toggle { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 6px; padding: 0;
    border: 0; background: none; color: var(--muted); cursor: pointer; vertical-align: -4px; }
.rt-toggle .ic { width: 14px; height: 14px; transition: transform .15s; }
tr.rt-group[aria-expanded="true"] .rt-toggle .ic { transform: rotate(90deg); }
table.rt tr.rt-total td { font-weight: 800; border-top: 2px solid var(--border-strong); border-bottom: 0; background: var(--surface-2); }
table.rt td.neg { color: var(--danger); font-weight: 600; }
table.rt td.pos { color: var(--success); font-weight: 600; }
table.rt td.muted { color: var(--muted); }
table.rt td.strong { font-weight: 800; }
table.rt td.weekend { color: var(--danger); }
table.rt td[class*="heat-"] { font-weight: 700; }
table.rt td.heat-0 { background: color-mix(in srgb, var(--primary) 4%, transparent); }
table.rt td.heat-1 { background: color-mix(in srgb, var(--primary) 12%, transparent); }
table.rt td.heat-2 { background: color-mix(in srgb, var(--primary) 22%, transparent); }
table.rt td.heat-3 { background: color-mix(in srgb, var(--primary) 34%, transparent); }
table.rt td.heat-4 { background: color-mix(in srgb, var(--primary) 50%, transparent); color: #fff; }
.rt-more { margin: 8px 2px 0; font-size: 13px; }
.rt-empty { padding: 24px; }
.rt-notes { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; display: grid; gap: 3px; }
.rt-rules { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--border); color: var(--muted); font-size: 12.5px; }
.rt-rules-link { margin-left: 6px; white-space: nowrap; font-weight: 600; }
@media print { .rt-rules-link { display: none; } }
/* «Ҳисобот қоидалари» sahifasi: bo'lim kartalari (qisqa holat + «Ўзгартириш» → modal). */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.rules-card { display: flex; flex-direction: column; gap: 8px; }
.rules-card h2 { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 8px; }
.rules-card ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.rules-card .rules-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.rules-field { display: grid; gap: 4px; margin-bottom: 12px; }
.rules-field .hint { margin: 0; }
.rules-field .rules-def { font-size: 12px; color: var(--muted); }
.report-full { padding: 8px; }
.report-desc { margin: 6px 0 0; max-width: 720px; }
.report-hotel select, .period-bar > select, .period-bar input[type=month], .year-period select {
    font: inherit; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text);
}
/* «Йил (ойлар бўйича)»: yil, ko'rsatkich, solishtirish; jadvalda kelajak oylar — kulrang, o'tgan yil qatori — kursiv. */
.year-period select { max-width: 260px; }
.year-period .check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; white-space: nowrap; }
table.rt td.rt-future { background: var(--surface-2); }
table.rt tr.rt-prev td { color: var(--muted); font-style: italic; border-top: 1px dashed var(--border-strong); }
.year-chart { margin-top: 16px; }
@media (max-width: 720px) {
    .period-bar .custom-period.year-period { display: flex; flex-wrap: wrap; }
    .year-period select { max-width: 100%; flex: 1 1 140px; }
}

/* ---------- Hisobotlar katalogi ---------- */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.catalog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.catalog-list li { padding: 10px 10px; border-radius: 10px; display: grid; gap: 4px; }
.catalog-list li:hover { background: var(--surface-2); }
.catalog-list li a, .catalog-list li > div:first-child { display: grid; gap: 2px; color: var(--text); }
.catalog-list li .muted { font-size: 12.5px; }
.catalog-list li.unavailable { opacity: .6; }
.catalog-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.catalog-exely { font-size: 11.5px; color: var(--muted); font-style: italic; }

/* ---------- Hisobotlar menyusi (katta) ---------- */
/* Menyu topbar'ga bog'lanadi (sticky — joylashuv konteyneri): ekranning ikki cheti orasida, tugma joyidan qat'i nazar. */
.nav-group.nav-mega { position: static; }
.nav-menu.mega-menu {
    left: 16px; right: 16px; top: 100%; margin: 0 auto; max-width: 1180px; min-width: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 12px; padding: 14px;
    max-height: calc(var(--vh, 1vh) * 100 - 90px); overflow-y: auto; overscroll-behavior: contain;
}
/* Tugmadan menyuga sichqoncha o'tayotganda yopilib qolmasin. */
.nav-menu.mega-menu::before { display: none; }
.nav-mega .nav-toggle { position: relative; }
.nav-mega .nav-toggle::after { content: ""; position: absolute; left: -8px; right: -8px; top: 100%; height: 28px; }
.mega-col { display: grid; align-content: start; gap: 1px; min-width: 0; }
.mega-head { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 10px 6px; }
.mega-menu .mega-col a { padding: 6px 10px; font-size: 13.5px; white-space: normal; line-height: 1.35; overflow-wrap: break-word; }
.mega-foot { grid-column: 1 / -1; display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 6px; }
.mega-foot a { font-weight: 700; color: var(--primary); }
.ops-context { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 4px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.ops-context b { color: var(--text); }
.ops-context a { font-weight: 700; color: var(--primary); }

/* ---------- USALI xarajatlari ---------- */
.usali-dept { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.usali-dept legend { font-weight: 800; padding: 0 6px; }
.usali-row { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 12px; align-items: center; padding: 4px 0; }
.usali-row label { font-size: 14px; }
.usali-row input { font: inherit; text-align: right; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px;
    background: var(--surface-2); color: var(--text); font-variant-numeric: tabular-nums; }

@media (max-width: 960px) {
    .ws-block.ws-wide, .ws-block.ws-narrow { grid-column: 1 / -1; }
    .nav-menu.mega-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .nav-menu.mega-menu { left: 8px; right: 8px; grid-template-columns: 1fr; padding: 10px; max-height: calc(var(--vh, 1vh) * 70); }
    .mega-foot { flex-direction: column; }
    .usali-row { grid-template-columns: 1fr; gap: 4px; }
    .ws-toolbar { top: 0; }
}

/* hidden atributi har doim ustun (display beruvchi klasslar ham) */
[hidden] { display: none !important; }

/* Faktura.uz hujjatlari: qatordagi kichik forma (modda / bron) */
.fk-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fk-form select { max-width: 260px; font-size: 13px; padding: 6px 8px; }
.fk-form input[type=text] { width: 140px; font-size: 13px; padding: 6px 8px; }
.segmented.reveal { margin-bottom: 14px; }
.usali-row .usali-faktura { grid-column: 1 / -1; text-align: right; margin-top: -2px; color: var(--primary); }
.fk-providers { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.fk-connect .field[hidden] { display: none; }

/* Agentlar sahifasi: kartochkalar orasidagi masofa */
.agents-page > .card + .card { margin-top: 20px; }
.agents-page .card-title { margin-bottom: 12px; }
.agents-page .agent-col { min-width: 200px; max-width: 320px; }
.agents-page .agent-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; white-space: nowrap; }
.agents-page .agent-actions .btn { width: 100%; }

/* ---------- Интеграциялар ---------- */
.agent-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.integrations-page > .card + .card, .integrations-page > .card + .integ-foot { margin-top: 20px; }
.integrations-page .integ-chips { margin-bottom: 20px; }
.integrations-page .sync-card { display: grid; gap: 16px; scroll-margin-top: 90px; }
.integrations-page .sync-card .table-wrap { margin: 0; }
.integ-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.integ-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px;
    text-decoration: none; transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
a.integ-chip:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,.06)); }
.integ-chip span:last-child { color: var(--muted); }
.integ-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); flex: none; }
.lvl-ok .integ-dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.lvl-warn .integ-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.lvl-pending .integ-dot { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.integ-state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.integ-state.lvl-off { color: var(--muted); }
.integ-matrix td { vertical-align: middle; }
.integ-summary .integ-chips { margin-top: 14px; }
.integ-foot { display: flex; justify-content: flex-end; }
@media (max-width: 760px) {
    .integ-chip { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    a.integ-chip { transition: none; }
    a.integ-chip:hover { transform: none; }
}
.integ-summary { margin-top: 18px; }

/* ---------- Chorvoq Stay so'rovlari ---------- */
.stay-table td { vertical-align: top; }
.stay-table tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.stay-fields { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; font-size: 13px; }
.stay-fields dt { color: var(--muted); font-weight: 600; }
.stay-fields dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .stay-fields { grid-template-columns: 1fr; }
    .stay-fields dd { margin-bottom: 6px; }
}

/* ---------- Chorvoq Stay: toifalar, narxlar, kvartiralar ---------- */
.stay-page > .card + .card, .stay-page > .card + .table-wrap { margin-top: 20px; }
.stay-page .kind-tabs + .card { margin-top: 4px; }
.stay-filter { display: flex; gap: 8px; margin-bottom: 14px; }
.stay-cats td { vertical-align: middle; }
.stay-cats input[type=text], .stay-cats input[type=number] {
    width: 100%; min-width: 0; padding: 7px 9px; font-size: 13.5px; border: 1px solid var(--border);
    border-radius: 8px; background: var(--surface); color: var(--text);
}
.stay-cats input:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
.stay-cats td.num input { text-align: right; }
.stay-cats .w-xs { width: 64px; } .stay-cats .w-sm { width: 100px; } .stay-cats .w-md { width: 130px; }
.stay-cats td:first-child input { min-width: 170px; }
.stay-period-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; margin: 14px 0 18px; }
.stay-period-form .field-wide { grid-column: span 3; }
.stay-period-form .form-actions { margin: 0; }
tr.is-past td { opacity: .55; }
@media (max-width: 900px) {
    .stay-period-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stay-period-form .field-wide { grid-column: span 2; }
}
@media (max-width: 560px) {
    .stay-period-form { grid-template-columns: 1fr; }
    .stay-period-form .field-wide { grid-column: auto; }
}

/* Chorvoq Stay — mulkdor holati (jadval ichida) */
.owner-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 4px; min-width: 260px; }
.owner-status select, .owner-status input[type="text"] {
    font: inherit; font-size: 13.5px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--text); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.owner-status select { width: auto; }
.owner-status input[type="text"] { flex: 1 1 180px; min-width: 0; }
.owner-status select:hover, .owner-status input[type="text"]:hover { border-color: var(--border-strong); }
.owner-status select:focus, .owner-status input[type="text"]:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

/* Mehmonxonani o'chirish (xavfli amal) */
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.danger-zone .card-title { color: var(--danger); }
.danger-list { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 14px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.danger-list b { color: var(--text); }
.danger-form .field { max-width: 420px; }
.btn-danger:disabled { opacity: .45; cursor: not-allowed; }

/* Chorvoq Stay boshqaruvi — o'z mehmonxonasi sahifasida */
.stay-panel { margin-bottom: 20px; }
.stay-panel-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.stay-tile {
    display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
    background: var(--surface-2); color: var(--text); text-decoration: none;
    transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.stay-tile:hover { border-color: var(--primary); box-shadow: var(--ring); transform: translateY(-1px); }
.stay-tile:active { transform: translateY(0); }
.stay-tile b { font-size: 24px; line-height: 1.1; }
.stay-tile span { font-weight: 600; }
.stay-tile small { color: var(--muted); font-size: 12.5px; }
.stay-tile.has-new { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.stay-tile.has-new b { color: var(--primary); }
.stay-recent { margin-top: 16px; }
.stay-recent ul { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stay-recent li { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
@media (max-width: 720px) { .stay-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .stay-tile, .stay-tile:hover { transition: none; transform: none; } }

/* Agent yuklash jarayoni (foiz) */
.agent-progress { display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.agent-progress-bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.agent-progress-bar span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .6s ease; }
.agent-progress .muted { font-size: 12.5px; word-break: break-all; }
@media (prefers-reduced-motion: reduce) { .agent-progress-bar span { transition: none; } }

/* ===== PMS: resepshn, shaxmatka, bron kartasi ===== */
.pms-today { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.pms-list .card-title { display: flex; justify-content: space-between; align-items: baseline; }
.pms-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pms-item { display: grid; gap: 2px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); background: var(--surface-2); min-width: 0; }
.pms-item:hover { border-color: var(--primary); color: var(--text); }
.pms-item b, .pms-item span, .pms-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pms-item span, .pms-item small { color: var(--muted); font-size: 13px; }
.pms-item.warn { border-left: 3px solid var(--warning); }
.pms-board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pms-board-head .card-title { margin: 0; }
.pms-board-nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pms-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.pms-board-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pms-board { display: grid; grid-auto-rows: minmax(40px, auto); min-width: max-content; font-size: 13px; position: relative; }
.pms-corner, .pms-day, .pms-free, .pms-unit, .pms-cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pms-corner { position: sticky; left: 0; z-index: 3; background: var(--surface); padding: 8px 10px; font-weight: 700; display: flex; align-items: center; }
.pms-day { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 2px; background: var(--surface-2); line-height: 1.2; }
.pms-day small { color: var(--muted); font-size: 11px; }
.pms-day.weekend, .pms-cell.weekend { background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface)); }
.pms-day.today { background: var(--primary-soft); color: var(--primary); }
.pms-free { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--success); font-variant-numeric: tabular-nums; }
.pms-free.none { color: var(--danger); }
.pms-unit { position: sticky; left: 0; z-index: 3; background: var(--surface); padding: 6px 10px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.pms-unit small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Egasi 15.11: xona berilmagan integratsiya bronlari qatori — oddiy xonadan farqlansin (kursiv, chiziqli fon). */
.pms-unit-pending b { font-style: italic; font-weight: 600; color: var(--muted); }
.pms-cell.pms-cell-pending { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--muted) 8%, transparent) 6px 7px); }
.pms-cell { display: block; background: var(--surface); }
.pms-cell.today { box-shadow: inset 2px 0 0 var(--primary); }
.pms-cell:hover { background: var(--primary-soft); }
.pms-bar { z-index: 2; margin: 5px 3px; border-radius: 7px; padding: 0 8px; display: flex; align-items: center; font-weight: 600; font-size: 12.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; min-width: 0; box-shadow: var(--shadow-sm); }
.pms-bar:hover { filter: brightness(1.08); color: #fff; }
.pms-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.pms-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.st-PENDING { background: var(--amber); }
.st-CONFIRMED { background: #24449c; }   /* Navy: oq matn (Sky ustiga oq yozilmaydi) */
.st-CHECKED_IN { background: var(--success); }
.st-CHECKED_OUT { background: color-mix(in srgb, var(--muted) 75%, var(--surface)); }
.st-block { background: repeating-linear-gradient(45deg, var(--border-strong), var(--border-strong) 5px, var(--surface-2) 5px, var(--surface-2) 10px); color: var(--text); }
form.pms-bar { padding: 0; }
form.pms-bar button { all: unset; cursor: pointer; width: 100%; height: 100%; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-weight: 600; font-size: 12.5px; color: var(--text); display: flex; align-items: center; }
.pms-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 13px; }
.pms-legend i { display: inline-block; width: 16px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.pms-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pms-new { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.pms-quote dl, .pms-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; }
.pms-quote dt, .pms-dl dt { color: var(--muted); font-size: 14px; }
.pms-quote dd, .pms-dl dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pms-dl dd { text-align: left; }
.pms-quote .total { font-size: 17px; font-weight: 800; color: var(--text); border-top: 1px solid var(--border); padding-top: 8px; }
.pms-problems { margin: 12px 0 0; padding-left: 18px; color: var(--danger); font-size: 14px; }
.pms-problems:empty { display: none; }
.pms-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pms-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.pms-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.pms-inline .field { flex: 1 1 160px; min-width: 0; }
.pms-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
@media (max-width: 1000px) {
    .pms-today { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pms-new, .pms-card-grid { grid-template-columns: minmax(0, 1fr); }
    .pms-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .pms-today, .pms-grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ===== PMS: tozalash (housekeeping) — telefon ekraniga mos ===== */
.hk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hk-room { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hk-room.hk-DIRTY { border-left: 4px solid var(--danger); }
.hk-room.hk-INSPECTED { border-left: 4px solid var(--success); }
.hk-room.hk-CLEAN { border-left: 4px solid var(--primary); }
.hk-room.hk-urgent { box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 35%, transparent), var(--shadow); }
.hk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hk-head > div { display: grid; gap: 2px; min-width: 0; }
.hk-flags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.hk-flags span { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.hk-flags .tag-urgent { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 700; }
.hk-note { margin: 0; padding: 8px 10px; background: var(--warning-soft); color: var(--warning); border-radius: var(--radius-sm); font-size: 14px; }
.hk-upd { margin: 0; font-size: 12.5px; }
.hk-form { display: grid; gap: 8px; }
.hk-form input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; }
.hk-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.pms-hk { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.pms-hk.hk-DIRTY { background: var(--danger); }
.pms-hk.hk-CLEAN { background: var(--primary); }
.pms-hk.hk-INSPECTED { background: var(--success); }
.pms-test { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ===== PMS shaxmatka: toifa guruhlari, tozalik, to'langan ulush, qidiruv, belgilash ===== */
.pms-corner { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.pms-corner small { font-size: 11px; font-weight: 500; }
.pms-group { position: sticky; left: 0; z-index: 3; display: flex; align-items: baseline; gap: 8px; padding: 6px 10px;
    background: var(--surface-2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pms-group-free { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
    background: var(--surface-2); color: var(--success); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums; }
.pms-group-free.none { color: var(--danger); }
.pms-unit { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
.pms-unit b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pms-cell.today, .pms-day.today { box-shadow: inset 2px 0 0 var(--danger); }
a.pms-bar { background-image: linear-gradient(90deg, rgba(0, 0, 0, .22) 0 var(--paid, 0%), transparent var(--paid, 0%)); gap: 6px; }
a.pms-bar > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
a.pms-bar > small { flex: none; margin-left: auto; font-size: 10.5px; opacity: .9; }
a.pms-bar.dim { opacity: .18; }
a.pms-bar.hit { outline: 2px solid var(--text); outline-offset: 1px; }
.pms-select { z-index: 4; margin: 5px 3px; border-radius: 7px; border: 2px dashed var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent);
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--primary); pointer-events: none; }
.pms-search { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; min-width: 0; }
input.pms-search { width: 200px; }
.pms-paid-sample { background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 70%, #000) 0 50%, var(--primary) 50%); }
@media (max-width: 720px) { input.pms-search { width: 100%; } }

/* ===== PMS bron kartasi: qisqa ma'lumot qatori, pul kartochkalari, bo'limlar ===== */
.pms-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; padding: 0; margin-bottom: 16px; }
.pms-strip > div { display: grid; gap: 2px; padding: 14px 16px; border-right: 1px solid var(--border); min-width: 0; }
.pms-strip > div:last-child { border-right: 0; }
.pms-strip small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.pms-strip b, .pms-strip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pms-strip span { font-size: 13px; }
.pms-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.pms-money .card { display: grid; gap: 4px; }
.pms-money small { color: var(--muted); font-size: 13px; font-weight: 600; }
.pms-money b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pms-money .due { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.pms-money .due b { color: var(--danger); }
.text-ok { color: var(--success); }
.pms-progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.pms-progress i { display: block; height: 100%; background: var(--success); border-radius: 999px; }
.pms-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 0; overflow-x: auto; }
.pms-tabs button { all: unset; cursor: pointer; padding: 10px 16px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.pms-tabs button:hover { color: var(--text); }
.pms-tabs button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.pms-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.pms-tab { border-top-left-radius: 0; border-top-right-radius: 0; margin-top: 0; }
@media (max-width: 1000px) { .pms-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pms-strip > div:nth-child(3) { border-right: 0; } }
@media (max-width: 640px) { .pms-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pms-money { grid-template-columns: minmax(0, 1fr); } }

/* ===== PMS: ixcham kartochkalar (foydalanuvchi so'rovi), sozlamalar sahifasi ===== */
.pms-today { gap: 12px; margin-bottom: 16px; }
.pms-list { padding: 14px 16px; gap: 6px; }
.pms-list .card-title { font-size: 14.5px; margin: 0 0 2px; }
.pms-list .card-title .muted { font-size: 13px; background: var(--surface-2); border-radius: 999px; padding: 0 8px; min-width: 22px; text-align: center; }
.pms-list > p.muted { margin: 0; font-size: 13px; }
.pms-item { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; padding: 6px 9px; font-size: 13.5px; }
.pms-item b { font-size: 13.5px; }
.pms-item span, .pms-item small { font-size: 12.5px; }
.pms-item small { flex-basis: 100%; }
.pms-money { gap: 12px; margin-bottom: 14px; }
.pms-money .card { padding: 12px 16px; gap: 2px; }
.pms-money b { font-size: 18px; }
.pms-strip > div { padding: 10px 14px; }
.pms-details { padding: 0; }
.pms-details > summary { cursor: pointer; padding: 14px 18px; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pms-details > summary::-webkit-details-marker { display: none; }
.pms-details > summary::before { content: "+"; font-weight: 800; color: var(--primary); width: 14px; }
.pms-details[open] > summary::before { content: "−"; }
.pms-details > form { padding: 0 18px 18px; }
/* Ochilgan «Batafsil» ichidagi bo'limlar chetga yopishmasin; har tur o'z bloki */
.pms-details > :not(summary):not(form) { margin: 0 18px 16px; }
.pms-details > .pms-channel + .pms-channel { padding-top: 16px; border-top: 1px solid var(--border); }
.pms-details > details.pms-details { border: 1px solid var(--border); border-radius: 12px; }
.pms-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pms-settings-grid .card { display: flex; flex-direction: column; gap: 12px; }
.pms-settings-grid .card-title { margin: 0; }
.pms-settings-grid .form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pms-switch { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; }
.pms-switch input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.pms-switch span { display: grid; gap: 4px; }
.pms-switch small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.pms-switch:has(input:checked) { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); background: var(--primary-soft); }
.pms-settings-save { display: flex; justify-content: flex-end; margin: 14px 0 20px; }
.pms-test-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.pms-test-card > div { flex: 1 1 360px; min-width: 0; }
.pms-test-card p { margin: 6px 0 0; font-size: 14px; }
.pms-test-card form { display: flex; gap: 10px; align-items: center; }
@media (max-width: 1000px) { .pms-settings-grid { grid-template-columns: minmax(0, 1fr); } }
/* Yopiq menyular sahifani yonga surmasin; o'ng tomondagilari chapga ochiladi. */
html, body { overflow-x: clip; }
.nav-menu { max-width: calc(100vw - 24px); }
.nav > .nav-group:nth-last-child(-n+2) > .nav-menu:not(.mega-menu) { left: auto; right: 0; }

/* ===== PMS shaxmatka: hover, qisqa ma'lumot kartochkasi, rang izohlari ===== */
.pms-bar { transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), filter var(--t-fast); }
a.pms-bar:hover, a.pms-bar:focus-visible { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(16, 24, 48, .22); filter: brightness(1.06); z-index: 5; outline: none; }
.pms-cell { position: relative; transition: background var(--t-fast); }
a.pms-cell:hover::after { content: "+"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: var(--primary); font-size: 16px; }
.pms-unit:hover, .pms-group:hover { background: var(--primary-soft); }
.pms-pop { position: fixed; z-index: 60; min-width: 220px; max-width: 300px; padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    display: grid; gap: 4px; font-size: 13.5px; pointer-events: none; }
.pms-pop b { font-size: 14.5px; }
.pms-pop .pms-progress { margin-top: 6px; }
.pms-pop-status { justify-self: start; font-size: 11.5px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 999px; margin-bottom: 2px; }
.pms-legend { align-items: center; }
.pms-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.pms-today-sample { width: 3px !important; height: 14px !important; background: var(--danger); }
.pms-hk-sample { background: linear-gradient(90deg, var(--primary) 0 33%, var(--danger) 33% 66%, var(--success) 66%); }
.pms-free-sample { background: var(--success-soft); border: 1px solid var(--success); }
.pms-hint { font-size: 13px; margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) { .pms-bar, .pms-cell { transition: none; } a.pms-bar:hover { transform: none; } }
/* Kartochkadagi qoldiq va sanalar kesilmasin — o'ralib keyingi qatorga o'tadi. */
.pms-item span, .pms-item small { white-space: normal; overflow: visible; text-overflow: clip; }
/* Yangi bron — narx paneli: summalar bir qatorda (o'ralmaydi), uzun nomlar o'ralib, chapda turadi. */
.pms-quote dl { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
.pms-quote dd { white-space: nowrap; }
.pms-quote dt { min-width: 0; }

/* ===== PMS sozlamalari: tushunarli maydonlar ===== */
.pms-now { margin-bottom: 16px; }
.pms-now ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; font-size: 14px; }
.pms-now li { display: flex; gap: 10px; align-items: baseline; }
.pms-now .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transform: translateY(-1px); }
.pms-now .dot.ok { background: var(--success); }
.pms-now .dot.off { background: var(--border-strong); }
.pms-set-head { display: flex; gap: 12px; align-items: flex-start; }
.pms-set-head p { margin: 2px 0 0; font-size: 13px; }
/* Ovqatlanish turlari (PMS sozlamalari): galochka + kattalar / bolalar narxi */
.pms-meals { display: flex; flex-direction: column; gap: 10px; }
.pms-meal { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.pms-meal:last-child { border-bottom: 0; padding-bottom: 0; }
.pms-meal .check span { display: flex; flex-direction: column; gap: 1px; }
.pms-meal .check small { font-size: 12px; }
.pms-meal-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-left: 26px; }
.pms-meal-prices input { min-width: 0; }
.pms-set-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.pms-input-unit { display: flex; align-items: stretch; }
.pms-input-unit input { flex: 1; min-width: 0; border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.pms-input-unit span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-left: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.pms-example { display: block; font-size: 13px; font-weight: 600; color: var(--primary); }
.pms-example:empty { display: none; }
.pms-settings-grid .field .hint { line-height: 1.45; }
@media (max-width: 720px) { .pms-now ul { grid-template-columns: minmax(0, 1fr); } }
.pms-now li { display: block; position: relative; padding-left: 18px; line-height: 1.5; }
.pms-now li .dot { position: absolute; left: 0; top: .55em; transform: none; }

/* ===== PMS 1.5: hisob, depozit, kassa, chop etish ===== */
.pms-folio td { vertical-align: middle; }
.pms-folio .pms-folio-total td { font-weight: 800; border-top: 2px solid var(--border-strong); }
.pms-kind { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.fl-ROOM .pms-kind { background: var(--primary-soft); color: var(--primary); }
.fl-TAX .pms-kind { background: var(--warning-soft); color: var(--warning); }
.fl-SERVICE .pms-kind { background: var(--success-soft); color: var(--success); }
.fl-PENALTY .pms-kind, .fl-DISCOUNT .pms-kind { background: var(--danger-soft); color: var(--danger); }
.pms-field-sm { flex: 0 1 110px !important; }
.pms-deposit { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.pms-deposit .archive-title { margin: 0 0 4px; }
.pms-shift-open { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pms-shift-open > div { flex: 1 1 320px; }
.pms-invoice { max-width: 860px; }
.pms-invoice-actions { margin-bottom: 14px; justify-content: flex-end; }
.pms-invoice-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.pms-invoice-head h1 { margin: 0; font-size: 24px; }
.pms-invoice-meta { text-align: right; font-size: 13px; }
.pms-invoice .pms-folio { margin-top: 16px; }
.pms-invoice-foot { font-size: 12.5px; margin-top: 12px; }
.pms-sign { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 36px; font-size: 14px; }
@media print {
    .no-print, .topbar, .alert, .alerts, .back-link, .head-actions { display: none !important; }
    body { background: #fff !important; color: #000; }
    .pms-print .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
    .pms-print { padding: 0; max-width: none; }
    .reveal, .stagger > * { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ===== PMS jurnal ===== */
.pms-journal td.nowrap { white-space: nowrap; }
.pms-act { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.act-CREATE, .act-CONFIRM { background: var(--primary-soft); color: var(--primary); }
.act-CHECK_IN, .act-PAYMENT { background: var(--success-soft); color: var(--success); }
.act-CANCEL, .act-EXPIRE, .act-REFUND { background: var(--danger-soft); color: var(--danger); }
.act-DATES, .act-MOVE, .act-BLOCK, .act-UNBLOCK { background: var(--warning-soft); color: var(--warning); }
/* PMS sozlamalari: har bir maydon — alohida blok (bir-biridan ajralib turadi). */
.pms-settings-grid .card > .field { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); gap: 8px; }
.pms-settings-grid .card > .field:focus-within { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); background: var(--primary-soft); }
.pms-settings-grid .card > .field .pms-input-unit input { background: var(--surface); }
.pms-settings-grid .card { gap: 14px; }

/* ===== PMS kanallar (iCal) ===== */
.pms-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0 18px 4px; }
.pms-guide h4 { margin: 0 0 6px; font-size: 14.5px; }
.pms-guide ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.pms-guide-note { padding: 0 18px 16px; margin: 8px 0 0; }
.pms-channel { display: grid; gap: 12px; }
.pms-channel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pms-channel-export { display: grid; gap: 6px; }
.pms-channel-export label { font-weight: 600; font-size: 14px; }
.pms-copy { display: flex; gap: 8px; }
.pms-copy input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
    color: var(--text); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.pms-url { max-width: 380px; word-break: break-all; font-size: 12.5px; font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 1000px) { .pms-guide { grid-template-columns: minmax(0, 1fr); } }
/* Kanallar: ulanish jadvali va ulash yordamchisi */
.link-matrix { width: 100%; border-collapse: collapse; }
.link-matrix th, .link-matrix td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.link-matrix th { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.link-matrix td.link-cell { text-align: center; }
.link-matrix th.link-cell { text-align: center; }
.link-chip { font: inherit; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 5px 12px; cursor: pointer; white-space: nowrap;
    border: 1px dashed var(--border); background: var(--surface); color: var(--primary); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.link-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.link-chip.badge-ok, .link-chip.badge-warn, .link-chip.badge-danger { border-style: solid; border-color: transparent; }
.link-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; margin-top: 10px; }
.wiz { padding: 16px 22px 22px; display: grid; gap: 14px; }
.wiz-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; counter-reset: wiz; }
.wiz-steps li { flex: 1; font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 8px; border-radius: 8px; background: var(--surface-2); text-align: center; }
.wiz-steps li.on { background: var(--primary); color: #fff; }
.wiz-steps li.done { background: var(--success-soft); color: var(--success); }
.wiz section { display: grid; gap: 12px; }
.wiz [hidden], .wiz section[hidden] { display: none !important; }
.wiz h4 { margin: 0; font-size: 15px; }
.wiz ol { margin: 0; padding-left: 20px; display: grid; gap: 5px; font-size: 14px; line-height: 1.5; }
.wiz-graphic { width: 100%; max-width: 420px; height: auto; justify-self: center; }
.wiz-graphic .box { fill: var(--surface-2); stroke: var(--border); }
.wiz-graphic .box.on { fill: var(--primary-soft, var(--surface-2)); stroke: var(--primary); }
.wiz-graphic text { font: 700 12px system-ui, sans-serif; fill: var(--text); }
.wiz-graphic .arrow { stroke: var(--primary); stroke-width: 2.2; fill: none; marker-end: url(#wizArrow); }
.wiz-graphic .arrow.back { stroke: var(--success); marker-end: url(#wizArrowBack); }
.wiz-result { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.wiz-result.ok { background: var(--success-soft); color: var(--success); }
.wiz-result.bad { background: var(--danger-soft); color: var(--danger); }
.wiz-result.wait { background: var(--surface-2); color: var(--muted); }
.wiz-status { display: grid; gap: 8px; font-size: 14px; }
.wiz-status > div { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.wiz-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) { .wiz-steps li { font-size: 11px; padding: 5px 4px; } .link-matrix th, .link-matrix td { padding: 8px 4px; } }
/* PMS onlayn to'lov */
.pos-online-card { max-width: 420px; margin: 0 auto; text-align: center; display: grid; gap: 12px; justify-items: center; }
.pos-online-sum { font-size: 28px; font-weight: 700; margin: 0; }
.pos-online-qr svg { width: 260px; height: 260px; max-width: 100%; background: #fff; padding: 8px; border-radius: var(--radius-sm); }
.pos-online-done { font-size: 22px; font-weight: 700; color: var(--success, #15803d); margin: 0; }
.pos-online-form { margin-top: 6px; }
.pms-payreq { margin: 10px 0; }
.pms-payreq > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.pms-payreq .form { margin-top: 8px; }
.pms-payreq-url { width: 220px; max-width: 100%; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
    color: var(--text); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.pms-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pms-pay-status { display: flex; gap: 8px; flex-wrap: wrap; }
.pms-paylinks { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.pms-paylinks .archive-title { margin: 0; }
.pms-pay-name { display: flex; align-items: center; font-weight: 700; min-width: 56px; }
@media (max-width: 1000px) { .pms-settings-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== Mulkdorlar hisoboti va kabinet ===== */
.pms-owner-item { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border); }
.pms-owner-item:first-of-type { border-top: 0; }
.pms-owner-item p { margin: 4px 0 0; }
.pms-owner-item .pms-inline { margin-top: 0; }
.pms-owner-alert { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.pms-owner-month { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pms-owner-month .card-title { margin: 0; min-width: 140px; text-align: center; }
.pms-owner-month .spacer { flex: 1; }
.pms-owner-table td, .pms-owner-table th { white-space: nowrap; }
.pms-cell-form { display: inline-flex; gap: 6px; align-items: center; }
.pms-cell-form input[type=number] { width: 120px; padding: 4px 8px; text-align: right; }
.pms-cell-form input[type=text] { width: 170px; padding: 4px 8px; }
.pms-owner-actions { text-align: right; }
.pms-owner-subrow td { background: color-mix(in srgb, var(--muted) 6%, transparent); font-size: 14px; white-space: normal; }
.pms-owner-subrow summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.pms-owner-days { margin: 8px 0 0; padding-left: 18px; }
.pms-owner-dispute { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.pms-owner-dispute p { margin: 4px 0 10px; }
.pms-owner-note { margin-top: 14px; font-size: 13px; }
.pms-terms-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.pms-terms-grid .field small { display: block; margin-top: 4px; }
@media (max-width: 760px) { .pms-terms-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== Sayt so'rovlari (bron so'rovlari, mehmon savollari) ===== */
.stay-status-cell { min-width: 220px; }
.stay-status-form { display: grid; gap: 6px; margin-top: 8px; }
.stay-status-form select, .stay-status-form input { padding: 5px 8px; font-size: 14px; }
.stay-note { margin: 6px 0 0; font-size: 13px; }

/* ===== Resepshn: "Bugun" yon paneli (yashiriladi, kengligi suriladi) + shaxmatka ===== */
.pms-desk { max-width: 1680px; }
.pms-layout { --side-w: 300px; display: grid; grid-template-columns: var(--side-w) 10px minmax(0, 1fr); align-items: start; }
.pms-side { position: sticky; top: 12px; max-height: calc(var(--vh, 1vh) * 100 - 24px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
    padding-right: 2px; scrollbar-width: thin; min-width: 0; }
.pms-side-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 2px 0; }
.pms-side-head b { font-size: 15px; }
.pms-side-toggle { padding: 2px 10px; line-height: 1.4; }
.pms-side-body { display: flex; flex-direction: column; gap: 10px; }
.pms-side .pms-list { margin: 0; }
.pms-side-rail { display: none; }
.pms-side-open { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 10px 0; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.pms-side-open:hover { border-color: var(--primary); }
.pms-side-open span { font-weight: 700; color: var(--primary); }
.pms-side-open b { font-size: 12.5px; min-width: 26px; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); text-align: center; }
.pms-side-resize { align-self: stretch; cursor: col-resize; position: relative; touch-action: none; }
.pms-side-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
.pms-side-resize:hover::after, .pms-side-resize:focus-visible::after, .pms-layout.resizing .pms-side-resize::after { background: var(--primary); }
.pms-side-resize:focus-visible { outline: none; }
.pms-layout.resizing { user-select: none; cursor: col-resize; }
.pms-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pms-main > .card { margin: 0; }
/* Yashirilgan: tor ustun, faqat sonlar */
.pms-layout.side-hidden { grid-template-columns: 52px 10px minmax(0, 1fr); }
.pms-layout.side-hidden .pms-side-head, .pms-layout.side-hidden .pms-side-body { display: none; }
.pms-layout.side-hidden .pms-side-rail { display: block; }
.pms-layout.side-hidden .pms-side-resize { pointer-events: none; }
/* Tor ekran: panel shaxmatka ustida, kenglik surilmaydi */
@media (max-width: 1000px) {
    .pms-layout, .pms-layout.side-hidden { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .pms-side { position: static; max-height: none; overflow: visible; }
    .pms-side-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pms-side-resize { display: none; }
    .pms-layout.side-hidden .pms-side-open { flex-direction: row; justify-content: center; }
}
@media (max-width: 640px) { .pms-side-body { grid-template-columns: minmax(0, 1fr); } }
/* Yon paneldagi ro'yxatlar — ochiladi/yopiladi */
.pms-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; user-select: none; }
.pms-fold > summary::-webkit-details-marker { display: none; }
.pms-fold > summary .muted { margin-left: auto; }
.pms-fold-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); margin: -3px 2px 0 2px; transition: transform .15s; flex: none; }
.pms-fold:not([open]) .pms-fold-chev { transform: rotate(-45deg); margin-top: 0; }
.pms-fold > summary:hover .pms-fold-chev { border-color: var(--primary); }
.pms-fold:not([open]) { padding-bottom: 14px; }
.pms-fold:not([open]) > summary { margin-bottom: 0; }

/* Passiv rejim (parallel davr) banneri */
.topbar:has(.passive-banner) { flex-wrap: wrap; height: auto; min-height: 64px; }   /* banner ikkinchi qatorda — sarlavha ustiga chiqmasin */
.passive-banner { order: 99; flex: 1 1 100%; margin: 0 -28px; padding: 6px 16px; text-align: center; font-size: 13px; font-weight: 600;
    color: #7a4b00; background: #fff3cd; border-top: 1px solid #f0d58a; }
@media (max-width: 960px) { .passive-banner { margin: 0; border-radius: 8px; font-size: 12px; } }

/* ---------- Telefonda yig'iladigan menyu (gamburger) ---------- */
.nav-burger { display: none; }
@media (max-width: 960px) {
    .topbar .user-box { margin-left: auto; }
    .nav-burger {
        display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
        border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer;
    }
    .nav-burger svg { width: 22px; height: 22px; }
    .nav-burger .burger-close { display: none; }
    .topbar.nav-open .nav-burger .burger-open { display: none; }
    .topbar.nav-open .nav-burger .burger-close { display: inline; }
    /* Yopiq holatda menyu ko'rinmaydi; ochilganda — bir ustun, ekran ichida (sig'masa — o'zi aylanadi). */
    /* nowrap: aks holda menyu balandligi chegaraga yetganda bandlar o'ngdagi ikkinchi ustunga ko'chib, ekrandan chiqib ketardi. */
    .topbar .nav {
        display: none; order: 4; flex: 1 1 100%; flex-direction: column; flex-wrap: nowrap; gap: 4px; overflow-x: hidden;
        max-height: calc(var(--vh, 1vh) * 100 - 72px); max-height: calc(var(--vh, 1vh) * 100 - 72px); overflow-y: auto; overscroll-behavior: contain;
        padding: 6px 0 4px; border-top: 1px solid var(--border);
    }
    .topbar.nav-open .nav { display: flex; }
    /* Asosiy bandlar — kulrang plashka; ichki menyu — oq fon, chapda rangli chiziq (ikkalasi aniq farqlanadi). */
    .topbar .nav > a, .topbar .nav-toggle {
        display: flex; width: 100%; justify-content: space-between; white-space: normal;
        background: var(--surface-2); color: var(--text); font-weight: 700; padding: 11px 14px;
    }
    .topbar .nav > a.active, .topbar .nav-group.active > .nav-toggle { background: var(--primary-soft); color: var(--primary); }
    .topbar .nav-group.open > .nav-toggle { border-radius: 10px 10px 0 0; }
    .topbar .nav-group, .topbar .nav-group.nav-mega { position: static; }
    /* Ichki ro'yxatlar — suzib chiqmaydi, shu joyda pastga ochiladi. */
    .topbar .nav-menu, .topbar .nav-menu.mega-menu {
        position: static; display: none; opacity: 1; visibility: visible; transform: none;
        min-width: 0; max-width: none; max-height: none; overflow: visible; margin: 0 0 4px; padding: 6px 6px 6px 10px;
        grid-template-columns: 1fr; gap: 1px; left: auto; right: auto;
        background: var(--surface); border: 1px solid var(--border); border-top: 0; border-left: 3px solid var(--primary);
        border-radius: 0 0 10px 10px; box-shadow: none;
    }
    .topbar .nav-menu a { color: var(--text); font-weight: 500; padding: 9px 10px; }
    .topbar .mega-head { padding: 8px 10px 4px; color: var(--primary); }
    .topbar .nav-menu::before, .topbar .nav-mega .nav-toggle::after { display: none; }
    .topbar .nav-group.open .nav-menu { display: grid; }
    .topbar .nav-menu a, .topbar .mega-menu .mega-col a { white-space: normal; overflow-wrap: anywhere; }
    .topbar .mega-foot { flex-direction: column; }
}
/* Bugungi tushum taqsimoti: har biri alohida qatorda */
.pay-break { display: grid; gap: 1px; margin-top: 4px; }
.pay-break b { color: var(--text); font-weight: 700; }
.pay-break .muted b { color: var(--muted); }

/* Bloklar: keng blok yonidagi tor blok (masalan, savdo kanallari ro'yxati) uzun bo'lsa — o'ng ustunda ikki qator davom etadi,
   undan keyingi to'liq kenglikdagi blok (hisobot) esa uning yoniga, grafik ostiga (2/3 kenglik) joylashadi — bo'sh joy qolmaydi. */
@media (min-width: 961px) {
    .ws-wide + .ws-narrow { grid-row: span 40; }   /* ko'p qator: ortiqcha balandlik bo'sh qatorlarga ketadi, hisobot grafik ostiga ko'tariladi */
    .ws-wide + .ws-narrow + .ws-full { grid-column: 1 / span 2; }
}

/* Telefonda davr tanlash: tugmalar 3 ustunli panjarada (surilmaydi), sanalar bir qatorda, "Кўрсатиш" — to'liq kenglikda. */
@media (max-width: 720px) {
    .period-bar .segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; width: 100%; }
    .period-bar .segmented a { text-align: center; padding: 8px 4px; white-space: normal; font-size: 13.5px; }
    .period-bar .custom-period { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; width: 100%; }
    .period-bar .custom-period input[type=date] { width: 100%; min-width: 0; padding: 8px 6px; }
    .period-bar .custom-period .btn { grid-column: 1 / -1; width: 100%; }
}
/* Hisobot jadvali sarlavhasidagi davr ("... —" / "...") — ikki qatorda */
table.rt th .rt-line { display: block; }

/* "Бугун": Даромад·Тушум·Қарз — 3 ustun (tushum taqsimoti bir qatordan), Қарздорлик — 1 ustun; telefonda ikkalasi to'liq kenglikda. */
.stat-wide3 { grid-column: span 2; }
@media (min-width: 961px) {
    .stat-wide3 { grid-column: span 3; }
    .stat-wide3 .pay-break span { white-space: nowrap; }
}
@media (max-width: 960px) {
    .stat-debt { grid-column: span 2; }
}

/* "Чиқиш": kompyuterda — header'da; telefonda — menyu oxirida (header bir qatorga sig'adi). */
.nav-logout { display: none; margin: 0; }
@media (max-width: 960px) {
    .topbar .nav-logout { display: block; }
    /* Faqat «Чиқиш» formasi; user-box ichidagi oynalar (masalan «Шу меҳмонхонада таҳрирлаш») formasi yashirilmasin (26.11). */
    .topbar .user-box form:not(dialog form) { display: none; }
}

/* =========================================================
   Formalar — modal oynalarda (qo'shish / tahrirlash). Bitta modal ham qo'shish, ham tahrirlash uchun:
   tugmadagi data-action / data-title / data-field-* bilan to'ldiriladi (app.js).
   ========================================================= */
.modal { width: min(560px, calc(100vw - 24px)); }
.modal.modal-sm { width: min(440px, calc(100vw - 24px)); }
.modal.modal-wide { width: min(720px, calc(100vw - 24px)); }
.modal > .form { padding: 0; gap: 0; }
.modal > .form > .modal-head {
    position: sticky; top: 0; z-index: 2; padding: 18px 22px 14px; background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.modal > .form > .modal-head h3 { font-size: 18px; font-weight: 700; color: var(--primary); }
.modal > .form > :not(.modal-head):not(.form-actions):not([type=hidden]) { margin: 16px 22px 0; }
.modal > .form > .hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.modal > .form > .form-actions {
    position: sticky; bottom: 0; z-index: 2; margin: 20px 0 0; padding: 14px 22px; background: var(--surface-2);
    border-top: 1px solid var(--border);
}
.modal .form-grid { gap: 14px 16px; }
.modal .field label { font-size: 13px; font-weight: 600; color: var(--muted); }
@media (max-width: 560px) {
    .modal .form-grid { grid-template-columns: 1fr; }
    .modal > .form > .form-actions .btn { flex: 1; }
}

/* Sahifa tepasidagi asosiy amallar ("+ Qo'shish") va jadval qatoridagi tugmalar */
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin: 0 0 14px; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * + * { margin-left: 6px; }
.row-actions form { display: inline; }

/* Klassi yo'q tugmalar ham bezakli bo'lsin (asosiy ko'rinish — ikkinchi darajali tugma). */
button:not([class]):not([role=tab]), input[type=submit]:not([class]), input[type=button]:not([class]) {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px;
    font: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface);
    border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast);
}
button:not([class]):not([role=tab]):hover, input[type=submit]:not([class]):hover { background: var(--surface-2); border-color: var(--border-strong); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--ring); }
/* Shaxmatkadagi blok — butun chiziq bosiladigan tugma (bezak chiziqning o'zida). */
.pms-bar.st-block button { all: unset; cursor: pointer; display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Modalga ko'chgan formalarning o'rnidagi tugmalar */
.option-actions { margin-top: 12px; }
.pms-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pms-terms-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 12px 0 0; }
.pms-terms-view > div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.pms-terms-view dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.pms-terms-view dd { margin: 2px 0 0; font-weight: 700; color: var(--text); }
.dept-name { flex: 1; min-width: 0; }
.fk-pick { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; justify-content: flex-start; }
/* Modal ichidagi "howto" (qaerdan olinadi?) va checkbox qatorlari */
.modal .howto { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.modal > .form > label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }

/* Formalar konteynerdan kengaymasin (telefonda input/tugmalar kartochka yoki modal chetidan chiqib ketardi):
   .form — grid, ustuni konteyner kengligida; maydonlar torayishi mumkin. */
.form { grid-template-columns: minmax(0, 1fr); }
.form-grid > *, .field, .pms-inline > * { min-width: 0; }
.field input, .field select, .field textarea, .pms-input-unit input { width: 100%; min-width: 0; max-width: 100%; }
/* Sig'magan placeholder — kesilgan joyida «…» (to'liq matn — izohda, app.js fitPlaceholders). */
input:placeholder-shown { text-overflow: ellipsis; }
/* Belgilash katakchasi cho'zilmasin (aks holda check-list'da katakcha o'rtada, yozuv o'ngga surilardi). */
.field input[type=checkbox], .field input[type=radio] { width: 18px; flex: none; margin: 0; }
.pms-input-unit { min-width: 0; }
/* «Ҳаммасини белгилаш» — check-list ustida (app.js qo'shadi). */
.check-all { display: inline-flex; gap: 8px; align-items: center; margin: 2px 0 8px; font-size: 13.5px; font-weight: 600; color: var(--primary); cursor: pointer; }
.unit-group-title { font-weight: 700; font-size: 14px; margin: 12px 0 2px; color: var(--text); }
.unit-group-title:first-of-type { margin-top: 4px; }
.check-all input { width: 16px; height: 16px; accent-color: var(--primary); }
@media (max-width: 720px) {
    .btn { max-width: 100%; }
    .kind-tabs { flex-wrap: wrap; overflow: visible; }
}
/* Holat filtrlari (so'rovlar) — har doim qatorlarga tushadi, ekrandan chiqmaydi */
.stay-filter { display: flex; flex-wrap: wrap; gap: 6px; }
/* Tanlash ro'yxati (radio) — uzun variantlar select'ga sig'maganda */
.field > .label { font-weight: 600; font-size: 13px; color: var(--muted); }
.pick-list { display: grid; gap: 6px; max-height: calc(var(--vh, 1vh) * 52); overflow-y: auto; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.pick-group { border: 0; margin: 0; padding: 0; display: grid; gap: 2px; }
.pick-group legend { padding: 8px 8px 2px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); }
.pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 9px; cursor: pointer; line-height: 1.35; font-size: 14px; }
.pick:hover { background: var(--surface); }
.pick input { margin-top: 2px; accent-color: var(--primary); flex: none; }
.pick:has(input:checked) { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* Chorvoq Stay: sarlavha tugmasi o'ng tepada, bo'limlar va sahifa tugmasi bir qatorda. */
.stay-page .page-head { flex-wrap: nowrap; align-items: flex-start; margin-bottom: 16px; }
.stay-page .page-head > .btn { flex: none; }
.stay-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.stay-bar > .kind-tabs, .stay-bar > .page-actions { margin-bottom: 0; }
.stay-bar > .page-actions { margin-left: auto; }
@media (max-width: 720px) { .stay-page .page-head { flex-wrap: wrap; } }
/* PMS sahifalari: ketma-ket kartochkalar orasida bo'shliq (yopishib qolmasin). */
.pms-page > section + section, .pms-page > .card + .card, .pms-page > section + .card, .pms-page > .card + section { margin-top: 16px; }
/* Mulkdorlar hisoboti: mulkdor sarlavha qatori, ostida kvartiralari. */
.pms-owner-group + .pms-owner-group .pms-owner-head td { border-top: 2px solid var(--border-strong); }
.pms-owner-head td { background: var(--surface-2); }
.pms-owner-head td:first-child { white-space: normal; }
.pms-owner-head td:first-child > * + * { margin-left: 8px; }
.pms-owner-group tr:not(.pms-owner-head) td:first-child { padding-left: 22px; }
.pms-owner-actions { white-space: nowrap; }
.pms-owner-actions > * { display: inline-block; vertical-align: middle; }
.pms-owner-actions > * + * { margin-left: 6px; }
/* Chorvoq Stay logotipi hisobotlarda (chorvoqstay.uz ranglari: ink #0E4246, gold #BD8A2E). */
.stay-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 18px;
    border-bottom: 2px solid #BD8A2E; }
.stay-brand-logo { display: inline-flex; align-items: center; gap: 10px; color: #0E4246; }
.stay-brand-logo svg { width: 34px; height: 40px; flex: none; }
.stay-brand-wm { display: flex; flex-direction: column; line-height: 1; }
.stay-brand-wm b { font-family: "Spectral", Georgia, "Times New Roman", serif; font-weight: 700; font-size: 21px; letter-spacing: .14em; }
.stay-brand-wm span { font-size: 10.5px; font-weight: 600; letter-spacing: .62em; color: #BD8A2E; margin-top: 4px; padding-left: 2px; }
.stay-brand-site { color: #0E4246; font-weight: 600; font-size: 13px; }
:root[data-theme="dark"] .stay-brand-logo,
    :root[data-theme="dark"] .stay-brand-site { color: #E9F1F0; }
@media print { .stay-brand-logo, .stay-brand-site { color: #0E4246 !important; } .stay-brand { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* chorvoqstay.uz mulkdor kabineti: sarlavha logotipi va kirish sahifasi. */
.stay-header-brand { text-decoration: none; }
.stay-header-brand .stay-brand-wm b { font-size: 18px; }
.stay-login-brand .stay-brand { margin-bottom: 12px; }
.stay-tg-login { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #229ED9; border-color: #229ED9; font-size: 16px; padding: 12px 16px; }
.stay-tg-login:hover { background: #1c8cc2; border-color: #1c8cc2; }
.stay-tg-login svg { width: 22px; height: 22px; }
.stay-tg-hint { margin: 8px 0 14px; text-align: center; }
.stay-pw-login { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.stay-pw-login > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.stay-pw-login .form { margin-top: 12px; }
.stay-login-foot { margin-top: 16px; text-align: center; }
/* «Кабинетини кўриш»: platforma egasi mulkdor ko'zi bilan ko'ryapti — tepada doim ko'rinib turadi. */
.topbar:has(.impersonate-banner) { flex-wrap: wrap; }
.impersonate-banner { display: flex; align-items: center; justify-content: center; gap: 12px; background: #BD8A2E; color: #fff; }
.impersonate-banner form { display: inline; }
.cabinet-tg { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
    border-color: color-mix(in srgb, #229ED9 45%, var(--border)); }
.cabinet-tg p { margin: 4px 0 0; }
.cabinet-tg .stay-tg-login { font-size: 14px; padding: 9px 16px; }
/* Nomzod kabineti: ariza holati va hamkorlik shartlari. */
.cabinet-app { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cabinet-app:last-of-type { border-bottom: 0; }
.cabinet-terms ol { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.55; }
.cabinet-terms li::marker { color: var(--primary); font-weight: 700; }
/* PMS modullari (Бошқарув → Меҳмонхона): galochkali kartalar. */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; margin: 6px 0 18px; }
.module-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.module-card:hover { border-color: var(--border-strong); }
.module-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.module-card input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--primary); }
.module-card > span { display: grid; gap: 3px; min-width: 0; }
.module-card small { font-size: 12.5px; line-height: 1.4; }
.module-card .badge { justify-self: start; }
.module-card.soon b { color: var(--muted); }
/* Роллар ва рухсатлар: lavozimlar ustunlarda, ruxsatlar qatorlarda. */
.roles-table th.role-col, .roles-table td.role-col { text-align: center; min-width: 110px; }
.roles-table th.role-col span { display: block; white-space: normal; }
.roles-table th.role-col small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; }
.roles-table td.role-col input { width: 18px; height: 18px; accent-color: var(--primary); }
.roles-table .roles-group td { background: var(--surface-2); font-weight: 700; color: var(--primary); }
.roles-table tbody tr:not(.roles-group):hover td { background: var(--primary-soft); }
/* Bron kartasi: barcha amallar bitta panelda — asosiy qadam, pul, hujjat, «Яна». */
.booking-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.booking-actions form { display: contents; }
.booking-actions-group { display: inline-flex; flex-wrap: wrap; gap: 8px; padding: 0 8px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.booking-actions-group:empty { display: none; }
.action-more { position: relative; margin-left: auto; }
.action-more > summary { list-style: none; cursor: pointer; }
.action-more > summary::-webkit-details-marker { display: none; }
.action-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; display: grid; padding: 6px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .14); }
.action-menu .menu-item { all: unset; box-sizing: border-box; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); }
.action-menu .menu-item:hover, .action-menu .menu-item:focus-visible { background: var(--primary-soft); color: var(--primary); }
.action-menu .menu-item.danger { color: var(--danger); }
.action-menu .menu-item.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
@media (max-width: 720px) {
    .booking-actions > form .btn, .booking-actions > .btn { flex: 1 1 auto; }
    .booking-actions-group { border: 0; padding: 0; width: 100%; }
    .booking-actions-group .btn { flex: 1; }
    .action-more { margin-left: 0; }
}
.booking-actions { position: relative; z-index: 20; }
.booking-actions-group:first-child { border-left: 0; padding-left: 0; }
/* Jurnal (1.3): bo'lim filtri, "avval → keyin". */
.pms-journal .j-change { margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.pms-journal .j-area { font-size: 12px; margin-top: 3px; }
/* Menyu bandlari: nom + qisqa izoh (nima uchun) — hammasi tushunarli bo'lsin. */
.nav-menu a > span { display: block; }
.nav-menu a > small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; line-height: 1.3; color: var(--muted); white-space: normal; }
.nav-menu a:hover > small, .nav-menu a.active > small { color: inherit; opacity: .8; }
.nav-menu:not(.mega-menu) { min-width: 290px; }
.nav-menu:not(.mega-menu) a { white-space: normal; }
/* Sahifa haqida: sarlavha yonidagi ⓘ — bosilsa izoh qatori ochiladi. */
.about-toggle { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 10px;
    vertical-align: middle; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--muted);
    font: 700 13px/1 Georgia, serif; font-style: italic; cursor: pointer; padding: 0; transition: color var(--t-fast), border-color var(--t-fast); }
.about-toggle:hover, .about-toggle[aria-expanded="true"] { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.page-about { max-width: 820px; }
/* Chop etishda izoh belgilari (ⓘ) va "sahifa haqida" tugmasi chiqmaydi. */
@media print { .tip, .about-toggle, .page-about { display: none !important; } }
/* Xona xususiyatlari: formada galochkalar, ro'yxatda kichik belgilar. */
.feature-picks { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 0; }
.unit-feats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.unit-feats .chip { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }

/* Hujjatlar (hisob, tasdiq, vaucher, kvitansiya): sarlavha — logotip va rekvizitlar */
.pms-lang { display: inline-flex; gap: 4px; }
.pms-doc-about { margin: 0 0 12px; font-size: 13px; }
.pms-doc-letterhead { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 2px solid var(--border); }
.pms-doc-brand { display: flex; gap: 14px; align-items: flex-start; }
.pms-doc-logo { max-height: 64px; max-width: 180px; object-fit: contain; }
.pms-doc-org { font-size: 13px; line-height: 1.45; color: var(--muted); }
.pms-doc-org strong { font-size: 16px; color: var(--text); }
.pms-doc .pms-invoice-meta h1 { margin: 0 0 2px; font-size: 22px; }
.pms-doc-no { font-weight: 700; font-size: 15px; }
.pms-doc-lead { font-size: 15px; margin: 0 0 14px; }
.pms-doc-amount { font-size: 30px; font-weight: 700; margin: 4px 0 16px; }
.pms-doc-amount.pms-doc-voided { text-decoration: line-through; color: #888; margin-bottom: 6px; }
.pms-doc-void { display: inline-block; margin: 0 0 16px; padding: 4px 12px; border: 2px solid #b91c1c; color: #b91c1c; border-radius: 6px; letter-spacing: .04em; }
.pms-doc-note { margin-top: 16px; padding: 10px 12px; border-radius: 8px; background: var(--primary-soft); font-size: 13.5px; white-space: pre-line; }
@media print { .pms-doc-note { background: none; border: 1px solid #ccc; } }
#requisites { margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.pms-req-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pms-req-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 800px) { .pms-req-grid { grid-template-columns: minmax(0, 1fr); } }

/* Profil → Telefon ilovasi (PWA) */
.pwa-card { display: flex; flex-direction: column; gap: 12px; }
.pwa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.pwa-steps li { display: flex; flex-direction: column; gap: 8px; }
.pwa-steps .hint { color: var(--muted); font-size: 12.5px; }

/* Soddalashtirilgan ekran (xizmatchi, telefon): oddiy sarlavha, katta bosiladigan tugmalar */
.simple-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); }
.simple-top-mark { border-radius: 8px; flex: none; }
.simple-top-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.simple-top-title b { font-size: 16px; }
.simple-top-title small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simple-top form { margin: 0; }
.simple-screen { padding-top: 12px; }
.simple-screen .page-head h1 { font-size: 22px; }
.simple-screen .hk-buttons .btn { min-height: 48px; font-size: 15px; padding: 10px 16px; flex: 1 1 140px; }
.simple-screen .hk-form input[type=text] { min-height: 46px; font-size: 16px; }
.simple-screen .hk-room b { font-size: 18px; }

/* Litsenziya ogohlantirishi (sinov / tugayapti / tugagan) */
.license-banner { background: #fff4d6; color: #7a5300; }
.license-banner.license-expired { background: #fde8e8; color: #9b1c1c; }
:root[data-theme="dark"] .license-banner { background: #3a2f12; color: #f5d27a; }
    :root[data-theme="dark"] .license-banner.license-expired { background: #3b1717; color: #f7b4b4; }

/* Bron kartasi: bir buyurtmadagi xonalar va mehmonlar ro'yxati */
.pms-order { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; margin-bottom: 12px; }
.pms-order-title { margin-right: 6px; font-size: 14px; }
.pms-order-room { display: inline-flex; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; text-decoration: none; color: var(--text); }
.pms-order-room.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.pms-dup { border: 1px solid var(--warning); background: var(--warning-soft); }
.pms-guests-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.pms-guests-head p { margin: 0; }

/* Yangi bron: xonalar qatorlari (bir buyurtmada bir nechta xona) */
.pms-rooms { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 14px; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.pms-rooms legend { font-weight: 700; padding: 0 6px; }
#roomRows { display: flex; flex-direction: column; gap: 10px; }
.pms-room-row { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(0, 1.2fr) repeat(3, minmax(64px, .5fr)) 36px; gap: 10px; align-items: end;
    padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.pms-room-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pms-room-no { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center;
    font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.pms-room-del { height: 40px; }
.pms-room-sum { grid-column: 2 / -1; font-size: 12.5px; }
.pms-room-sum:empty { display: none; }
#addRoom { align-self: flex-start; }
.pms-room-row .field-num label { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
    .pms-room-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pms-room-row > .field:not(.field-num) { grid-column: 1 / -1; }
    .pms-room-no { grid-column: 1; margin: 0; }
    .pms-room-del { grid-column: 3; grid-row: 1; justify-self: end; }
    .pms-room-sum { grid-column: 1 / -1; }
}

/* Guruh broni: shaxmatkada guruh rangi (chap chiziq), ro'yxatda rang nuqtasi */
.pms-bar.grp { box-shadow: inset 5px 0 0 var(--grp); }
.pms-group-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: 6px; flex: none; }
.pms-group-link { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }
.pms-group-toggle { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }

/* Справка: header tugmasi va o'ng yon panel */
.help-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; flex: none; }
.help-btn svg { width: 18px; height: 18px; color: var(--primary); }
.help-btn:hover, .help-btn[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.help-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 900; background: var(--surface);
    border-left: 1px solid var(--border); box-shadow: -12px 0 40px rgba(15, 23, 42, .12); display: flex; flex-direction: column; outline: none; }
.help-drawer[hidden] { display: none; }
.help-drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.help-drawer-head b { flex: 1; font-size: 17px; }
.help-drawer-body { overflow-y: auto; padding: 16px 18px 28px; display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 1200px) { body.help-open main { margin-right: 440px; } }
.help-article h3 { margin: 0 0 6px; font-size: 18px; }
.help-article h4 { margin: 14px 0 6px; font-size: 14.5px; color: var(--primary); }
.help-article p, .help-article li { font-size: 14px; line-height: 1.55; }
.help-article ol, .help-article ul { padding-left: 20px; margin: 4px 0; display: flex; flex-direction: column; gap: 5px; }
.help-article .help-tip { padding: 9px 12px; border-radius: 10px; background: var(--primary-soft); font-size: 13.5px; }
.help-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.help-drawer-body .help-article + .help-article { border-top: 1px dashed var(--border); padding-top: 18px; }
.help-kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--border); border-radius: 5px; font-size: 12.5px; }
/* /help sahifasi */
.help-index { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.help-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.help-list a { text-decoration: none; color: var(--text); font-weight: 600; }
.help-list small { display: block; color: var(--muted); font-weight: 400; }
.help-role-table td:first-child { white-space: nowrap; font-weight: 600; vertical-align: top; }
.help-role-table a { display: inline-block; margin: 0 8px 4px 0; }
.help-page { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-side { position: sticky; top: 80px; max-height: calc(var(--vh, 1vh) * 100 - 100px); overflow-y: auto; }
.help-side a.active { color: var(--primary); }
@media (max-width: 900px) { .help-index, .help-page { grid-template-columns: minmax(0, 1fr); } .help-side { position: static; max-height: none; } .help-btn span { display: none; } }
@media print { .help-btn, .help-drawer, .help-side { display: none !important; } }

/* Bron hisobi: A/B hisoblar (folio) */
.pms-folios { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.pms-folio-card { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; }
.pms-folio-badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 700; font-size: 12px; background: var(--surface-2); }
.pms-folio-badge.fo-B { background: #ede9fe; color: #6d28d9; }
.pms-folio-cell { white-space: nowrap; }
.pms-folio-cell form { display: inline; }

/* Invoice 2.0: bloklar (yashash / qo'shimcha xizmatlar) */
.pms-doc-block td { padding-top: 14px; font-weight: 700; color: var(--primary); border-bottom: 1px solid var(--border); }
.pms-doc-subtotal td { font-style: italic; color: var(--muted); }

/* Hujjatni yuborish */
.pms-share { position: relative; }
.pms-share-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(360px, 90vw); padding: 12px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(15, 23, 42, .14); display: flex; flex-direction: column; gap: 8px; }
.pms-share-box[hidden] { display: none; }
.pms-share-box input { width: 100%; font-size: 12.5px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.pms-share-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* «Бугун»: diqqat bloklari (xona tayyor emas, kech qoldi) */
.pms-alert-list { border-color: #f5c56b; background: #fffaf0; }
:root[data-theme="dark"] .pms-alert-list { border-color: #8a6a1f; background: #2a2414; }

/* Smena topshirish */
.pms-handover-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .pms-handover-grid { grid-template-columns: 1fr; } }
.pms-handover-grid .pms-list h4 { margin: 12px 0 4px; font-size: .9rem; }
.pms-note-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pms-note-row .field { flex: 1; min-width: 140px; margin: 0; }
.pms-notes { list-style: none; padding: 0; margin: 12px 0 0; }
.pms-notes li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border, #e5e7eb); }
.pms-notes li > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.pms-notes li.task .badge { background: #fde7c2; color: #7a4a00; }
.pms-notes li.done { opacity: .7; }
.pms-notes-done { margin-top: 10px; }
@media print { .pms-note-form, .pms-notes form, .pms-actions, .site-header, header, .help-drawer { display: none !important; } }

/* Tungi audit */
.alert-warn { background: #fff4dc; color: #7a4a00; border: 1px solid #f5c56b; }
:root[data-theme="dark"] .alert-warn { background: #2a2414; color: #f5c56b; border-color: #8a6a1f; }
.na-steps { list-style: none; padding: 0; margin: 0; }
.na-steps > li { padding: 12px 0; border-top: 1px solid var(--border, #e5e7eb); }
.na-steps > li:first-child { border-top: 0; }
.na-steps li.ok > b::before { content: "✓ "; color: #1a7f37; font-weight: 700; }
.na-steps li.warn > b::before { content: "! "; color: #b45309; font-weight: 700; }
.flash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
@media print { .na-close, .head-actions, .pms-actions { display: none !important; } }

/* Kontragentlar */
.card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head-row .card-title { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pms-rate-form { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border, #e5e7eb); }
.pms-actions form { display: inline; }
.pms-sub { margin: 18px 0 6px; font-size: .95rem; display: flex; align-items: center; gap: 4px; }

/* Akt-sverka */
.pms-actdoc h2 { font-size: 1.15rem; margin: 0 0 4px; text-align: center; }
.pms-actdoc > p:first-of-type { text-align: center; color: var(--muted); margin-top: 0; }
.pms-act-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 16px 0; }
@media (max-width: 640px) { .pms-act-sides { grid-template-columns: 1fr; } }
.pms-act-sum td { background: var(--surface-2, #f6f7f9); }
.pms-sign-line { margin-top: 28px; }
.pms-actdoc .pms-act-table td:nth-child(3) { overflow-wrap: anywhere; }
@media print { .no-print { display: none !important; } .pms-actdoc { box-shadow: none; border: 0; padding: 0; } }

/* Pasport skaneri */
.pms-scan { border: 1px dashed var(--border, #d0d5dd); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: var(--surface-2, #f8fafc); }
.pms-scan label { font-weight: 600; display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.pms-scan textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; letter-spacing: .02em; }
.pms-scan-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.pms-scan-actions label.btn { margin: 0; font-weight: 500; cursor: pointer; }
.pms-passport summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

/* Xona holatlari 2.0: tozalanmoqda / tekshiruvda — sariq, ta'mirda — kulrang, DND — binafsha */
.hk-room.hk-CLEANING, .hk-room.hk-INSPECTION { border-left: 4px solid #d97706; }
.hk-room.hk-REPAIR { border-left: 4px solid #6b7280; }
.hk-room.hk-DND { border-left: 4px solid #7c3aed; }
.pms-hk.hk-CLEANING, .pms-hk.hk-INSPECTION { background: #d97706; }
.pms-hk.hk-REPAIR { background: #6b7280; }
.pms-hk.hk-DND { background: #7c3aed; }
.badge-warn-soft { background: #fef3c7; color: #92400e; }
.pms-anyway { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; font-size: .85rem; }
.hk-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* Tozalash rejasi */
.hk-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 16px 0; align-items: start; }
.hk-col { padding: 12px; min-height: 120px; transition: box-shadow .15s, outline-color .15s; outline: 2px dashed transparent; }
.hk-col.drop { outline-color: var(--primary); }
.hk-col-free { background: var(--surface-2, #f8fafc); }
.hk-col-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.hk-task { border: 1px solid var(--border, #e5e7eb); border-left: 4px solid var(--primary); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: var(--surface, #fff); cursor: grab; }
.hk-task.hk-p0 { border-left-color: var(--danger); }
.hk-task.hk-p1 { border-left-color: #d97706; }
.hk-task.hk-p4 { border-left-color: #7c3aed; }
.hk-task.dragging { opacity: .5; }
.hk-task-done { opacity: .55; cursor: default; }
.hk-task-main { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.hk-task-sub { display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; margin-top: 4px; }
.hk-move { margin-top: 6px; }
.hk-move select { width: 100%; font-size: .85rem; }
.hk-staff-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.pms-inline-form { display: inline; }
@media (prefers-reduced-motion: reduce) { .hk-col { transition: none; } }

/* Xizmatchi ilovasi */
.hk-checks { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 8px 10px; margin: 8px 0; display: grid; gap: 4px; }
.hk-checks legend { font-weight: 600; font-size: .9rem; padding: 0 4px; display: flex; align-items: center; gap: 4px; }
.hk-checks .check { font-size: .95rem; padding: 4px 0; }
.hk-extra { margin-top: 8px; border-top: 1px dashed var(--border, #e5e7eb); padding-top: 6px; }
.hk-extra summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.hk-minibar, .hk-report { display: grid; gap: 8px; margin-top: 6px; }
.hk-minibar label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hk-minibar input { width: 80px; }
.hk-report textarea { width: 100%; }
.hk-report-kind { display: flex; gap: 16px; }
.hk-photo-btn { justify-self: start; cursor: pointer; }
.hk-room.hk-queued { outline: 2px dashed #d97706; }
.hk-report-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border, #e5e7eb); }
.hk-report-item:first-of-type { border-top: 0; }
.hk-report-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.hk-report-body { flex: 1; display: grid; gap: 4px; }
.hk-report-body p { margin: 0; }

/* QR yorliqlar */
.hk-labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.hk-label { border: 1px dashed var(--border, #cbd5e1); border-radius: 10px; padding: 12px; display: grid; gap: 8px; justify-items: center; text-align: center; background: #fff; color: #111; break-inside: avoid; }
.hk-label-qr { width: 150px; height: 150px; }
.hk-label-qr svg { width: 100%; height: 100%; }
.hk-label-text { display: grid; gap: 2px; }
.hk-label-text b { font-size: 1.2rem; }
@media print {
    .hk-labels { grid-template-columns: repeat(3, 1fr); gap: 8mm; }
    .hk-label { border: 1px solid #999; }
    header, .site-header, .help-drawer { display: none !important; }
}
.hk-scan-dlg video { width: 100%; border-radius: 8px; background: #000; }

/* Matn va havola aralash uzun xabar: bitta oqim (ustunlarga bo'linmaydi), balandligi cheklanmaydi */
.alert.alert-text { display: block; max-height: none; line-height: 1.5; font-weight: 500; }
.alert.alert-text a { font-weight: 700; text-decoration: underline; }
.alert.alert-text .alert-close { float: right; margin: -2px -6px 0 8px; }

/* Real vaqt paneli */
.hk-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; margin-bottom: 12px; align-items: center; }
.hk-legend span { display: inline-flex; gap: 6px; align-items: center; }
.hk-legend .pms-hk { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.hk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.hk-tile { border: 1px solid var(--border, #e5e7eb); border-top: 5px solid var(--primary); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; background: var(--surface, #fff); }
.hk-tile small { font-size: .78rem; }
.hk-tile.hk-DIRTY { border-top-color: var(--danger); }
.hk-tile.hk-CLEANING, .hk-tile.hk-INSPECTION { border-top-color: #d97706; }
.hk-tile.hk-INSPECTED { border-top-color: var(--success); }
.hk-tile.hk-REPAIR { border-top-color: #6b7280; opacity: .8; }
.hk-tile.hk-DND { border-top-color: #7c3aed; }
.hk-tile.hk-late { box-shadow: 0 0 0 2px var(--danger) inset; }
.hk-tile.hk-arr b::after { content: " ●"; color: var(--danger); font-size: .7rem; vertical-align: super; }
.hk-shift { display: grid; gap: 8px; }
.hk-shift p { margin: 0; }
.hk-score { font-size: .85rem; }
.text-warn { color: #b45309; font-weight: 600; }

/* Texnik arizalar */
.mt-item { border-top: 1px solid var(--border, #e5e7eb); border-left: 4px solid var(--primary); padding: 10px 12px; display: grid; gap: 4px; }
.mt-item.mt-URGENT { border-left-color: var(--danger); }
.mt-item.mt-HIGH { border-left-color: #d97706; }
.mt-item.mt-late { background: var(--danger-soft, #fdecec); }
.mt-item p { margin: 0; }
.mt-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mt-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin-top: 4px; }
.mt-actions form { display: inline-flex; gap: 6px; }
.mt-done > summary { list-style: none; cursor: pointer; }
.mt-done > summary::-webkit-details-marker { display: none; }
.mt-done[open] form { margin-top: 6px; display: grid; gap: 6px; }

/* Fiskal chek (kvitansiya) */
.pms-fiscal { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #bbb; }
.pms-fiscal-qr { width: 110px; height: 110px; }
.pms-fiscal-qr svg { width: 100%; height: 100%; }
.pms-fiscal a { grid-column: 1 / -1; font-size: .85rem; }
.pms-paynow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0; padding: 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; }

/* Moliya hisobotlari */
.fin-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.fin-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 0; max-width: 100%; }
.fin-form label select, .fin-form label input { max-width: 100%; min-width: 0; }
.fin-table-wrap { overflow-x: auto; }
.fin-table { white-space: nowrap; font-size: 13px; }
.fin-table tr.muted td { color: var(--muted, #8a94a6); }

/* Tarif rejalari */
.inline-fields { display: flex; gap: 8px; }
.inline-fields input { flex: 1; min-width: 0; }
form.inline { display: inline; }

/* Narx kalendari */
.rc-grid { border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.rc-grid th, .rc-grid td { border: 1px solid var(--border, #e3e7ee); padding: 4px 6px; text-align: center; vertical-align: top; }
.rc-grid thead th { position: sticky; top: 0; background: var(--surface, #fff); font-weight: 600; }
.rc-grid .rc-cat { position: sticky; left: 0; background: var(--surface, #fff); text-align: left; min-width: 140px; z-index: 1; }
.rc-grid .rc-cat small { display: block; }
.rc-grid td { cursor: pointer; min-width: 64px; }
.rc-grid td:hover, .rc-grid td:focus { outline: 2px solid var(--sky, #3ba7e6); outline-offset: -2px; }
.rc-grid .rc-we { background: var(--surface-2, #f6f7f9); }
.rc-grid .rc-closed { background: #fde8e8; }
.rc-grid .rc-full .rc-free { color: #c0392b; font-weight: 700; }
.rc-ov { color: var(--sky, #1f7fc4); text-decoration: underline dotted; }
.rc-tags { display: flex; gap: 2px; justify-content: center; flex-wrap: wrap; min-height: 14px; }
.rc-tag { font-size: 10px; padding: 0 3px; border-radius: 3px; background: #eef1f6; color: #45526b; }
.rc-tag.rc-ss { background: #c0392b; color: #fff; }
.rc-free { display: block; color: var(--muted, #8a94a6); }
.rc-legend { margin-top: 10px; font-size: 13px; }

.card-alert { border-color: #e8a0a0; }

/* Mehmonxona sayti (boshqaruv) */
.site-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.site-theme { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 10px; border: 1px solid var(--border, #e3e7ee); border-radius: 10px; cursor: pointer; }
.site-theme:has(input:checked) { border-color: var(--sky, #3ba7e6); box-shadow: 0 0 0 2px rgba(59, 167, 230, .2); }
.site-theme input { display: none; }
.site-theme-swatch { grid-row: span 2; width: 44px; height: 44px; border-radius: 8px; border: 1px solid #d0d5dd; }
.site-theme small { grid-column: 2; color: var(--muted, #8a94a6); font-size: 12px; line-height: 1.3; }
.site-theme-modern .site-theme-swatch { background: linear-gradient(135deg, #fff 50%, #0f2a4a 50%); }
.site-theme-classic .site-theme-swatch { background: linear-gradient(135deg, #fbf8f3 50%, #8a6d3b 50%); }
.site-theme-resort .site-theme-swatch { background: linear-gradient(135deg, #bfe3da 50%, #1d6f6a 50%); }
.site-theme-dark .site-theme-swatch { background: linear-gradient(135deg, #0d1117 50%, #c8a96a 50%); }
.site-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.site-img { margin: 0; border: 1px solid var(--border, #e3e7ee); border-radius: 10px; overflow: hidden; }
.site-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f6f7f9; }
.site-img figcaption { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.site-img-alt input { width: 100%; font-size: 12px; padding: 4px 6px; }
.site-img-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.site-img-actions form { display: inline-flex; gap: 4px; }
.site-url a { word-break: break-all; }
.site-amens { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.site-room { border: 1px solid var(--border, #e3e7ee); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.site-room summary { cursor: pointer; }
.site-room[open] summary { margin-bottom: 10px; }
.site-service-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.site-service-row input[name=title] { min-width: 160px; }
.site-service-row input[name=text] { flex: 1; min-width: 200px; }
.site-sort { width: 70px; }
.site-tr summary { cursor: pointer; color: var(--sky, #1f7fc4); font-weight: 600; }
.site-tr[open] summary { margin-bottom: 8px; }
.site-tr-in { width: 120px; font-size: 12px; }
.site-quick { border: 2px dashed var(--sky, #3ba7e6); }
.site-check { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.site-check li span { display: inline-block; width: 18px; color: var(--muted, #8a94a6); font-weight: 700; }
.site-check li.done span { color: #1f9d55; }
.site-check li.done a { color: var(--muted, #8a94a6); }

/* Revenue */
.rev-table td.num { position: relative; }
.rev-bar { position: absolute; left: 0; top: 4px; bottom: 4px; width: var(--w, 0%); max-width: 100%; background: rgba(59, 167, 230, .15); border-radius: 3px; z-index: 0; }
.rev-table td.num > span:last-child { position: relative; z-index: 1; }

/* POS (planshet) */
.pos-page h1 { margin-bottom: 4px; }
.pos-outlets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pos-outlets a { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border, #e3e7ee); text-decoration: none; font-weight: 600; }
.pos-outlets a.on { background: var(--navy, #0f2a4a); color: #fff; border-color: transparent; }
.pos-floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pos-table-f { margin: 0; }
.pos-table { width: 100%; min-height: 110px; border-radius: 14px; border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; cursor: pointer; font: inherit; padding: 10px; }
.pos-table b { font-size: 1.4rem; }
.pos-table.free { background: #e8f6ee; border-color: #9ed6b4; }
.pos-table.busy { background: #fff4e0; border-color: #f2c97d; }
.pos-table.billed { background: #e6f1fb; border-color: #8cc3ec; }
.pos-table.loose { background: #f6f7f9; border: 2px dashed #c9cfd8; }
.pos-loose { display: flex; gap: 8px; flex-wrap: wrap; }
.pos-grid { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .pos-grid { grid-template-columns: 1fr; } }
.pos-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.pos-cats a { white-space: nowrap; padding: 10px 16px; border-radius: 10px; background: #f1f3f6; text-decoration: none; font-weight: 600; }
.pos-cats a.on { background: var(--navy, #0f2a4a); color: #fff; }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pos-items form { margin: 0; }
.pos-item { width: 100%; min-height: 90px; border-radius: 12px; border: 1px solid var(--border, #e3e7ee); background: #fff; cursor: pointer; font: inherit; padding: 10px;
    display: flex; flex-direction: column; justify-content: space-between; text-align: left; gap: 4px; }
.pos-item:active { transform: scale(.98); }
.pos-item.stop { opacity: .45; cursor: not-allowed; }
.pos-item span { color: var(--navy, #0f2a4a); font-weight: 700; }
.pos-pick { margin-top: 14px; border: 2px solid var(--sky, #3ba7e6); }
.pos-ticket { position: sticky; top: 80px; }
.pos-line { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border, #e3e7ee); }
.pos-line-main { display: flex; flex-direction: column; }
.pos-line-ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pos-line-ctl select { padding: 2px 4px; }
.pos-st { font-size: 11px; color: var(--muted, #8a94a6); }
.pos-line.st-SENT .pos-st { color: #b7791f; } .pos-line.st-READY .pos-st { color: #1f9d55; font-weight: 700; }
.pos-line.st-VOID { opacity: .45; text-decoration: line-through; }
.pos-total p { display: flex; justify-content: space-between; margin: 6px 0; }
.pos-grand { font-size: 1.2rem; }
.pos-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pos-actions form { margin: 0; }

/* KDS (oshxona ekrani) */
.kds-page { padding: 12px 16px; }
.kds-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.kds-head h1 { margin: 0; font-size: 1.4rem; }
.kds-clock { margin-left: auto; font-size: 1.4rem; font-weight: 700; }
.kds-empty { font-size: 1.4rem; color: var(--muted, #8a94a6); text-align: center; padding: 60px 0; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kds-card { background: #fff; border: 3px solid #dfe3ea; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.kds-card.warn { border-color: #f2c97d; } .kds-card.late { border-color: #e5484d; } .kds-card.ready { border-color: #46b37b; opacity: .8; }
.kds-card header { display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; }
.kds-timer { font-weight: 700; }
.kds-card.late .kds-timer { color: #e5484d; }
.kds-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kds-card li form { margin: 0; }
.kds-void { margin: 0; padding: 8px 10px; border: 2px solid #d64545; background: #fdecec; color: #a12020; border-radius: 8px; }
.kds-void s { color: #6b2020; }
.kds-void em { display: block; font-size: .85rem; }
.kds-card li button { width: 100%; text-align: left; border: 1px solid #e3e7ee; background: #f8f9fb; border-radius: 8px; padding: 8px 10px; font: inherit; cursor: pointer;
    display: flex; flex-direction: column; gap: 2px; }
.kds-card li button b { font-size: 1.05rem; }
.kds-card li button em { color: #c2410c; font-style: normal; font-weight: 700; }
.kds-card li.done button { background: #e8f6ee; text-decoration: line-through; color: #3b6e52; }
.kds-bump { width: 100%; }
.kds-ok { color: #1f7a4c; font-weight: 700; margin: 0; }
.pos-pay { border-top: 2px solid var(--border, #e3e7ee); margin-top: 10px; padding-top: 10px; }
.pos-pay-check p { display: flex; justify-content: space-between; margin: 4px 0; }
.pos-pay-form { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pos-pay-form input, .pos-pay-form select { padding: 8px; min-width: 0; flex: 1 1 120px; }
.pos-paid { list-style: none; padding: 0; margin: 6px 0; font-size: 13px; color: var(--muted, #8a94a6); }
.meal-done td { background: color-mix(in srgb, var(--success, #16a34a) 12%, transparent); color: var(--text); }
.meal-done td:first-child { box-shadow: inset 3px 0 0 var(--success, #16a34a); }
.meal-warn td { background: #fff4f2; }
.text-warning { color: #b7791f; }

/* HR 6.2 — smena grafigi */
.sched-filter { display: flex; gap: 8px; align-items: center; }
.sched-wrap { overflow-x: auto; }
.sched { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.sched th, .sched td { border: 1px solid var(--border); padding: 2px; text-align: center; min-width: 30px; }
.sched th small { display: block; font-weight: 400; color: var(--muted); font-size: 10px; }
.sched .sched-name { position: sticky; left: 0; background: var(--surface, #fff); text-align: left; min-width: 170px; padding: 4px 8px; z-index: 1; }
.sched .sched-name small { display: block; }
.sched .sched-we { background: var(--primary-soft); }
.sched select.sched-cell { width: 100%; min-width: 30px; padding: 2px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: center; appearance: none; cursor: pointer; }
.sched select.sched-cell option { color: #111; background: #fff; }
.sched tfoot td { font-weight: 600; }
.sched .sched-short { background: #fde2e2; color: #b42318; }
.sched .sched-total { white-space: nowrap; padding: 2px 6px; }
.sched .sched-saved { outline: 2px solid #22a06b; }
.sched-legend { font-size: 12px; margin-top: 8px; }

/* HR 6.3 — Графигим, so'rovlar */
.me-page [hidden] { display: none !important; }
.me-days { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.me-days li { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.me-days li.me-work { border-color: var(--primary); }
.me-code { color: #fff; border-radius: 6px; padding: 2px 8px; }
.me-date { text-transform: capitalize; }
.me-req { border-top: 1px solid var(--border); padding: 10px 0; }
.me-req:first-of-type { border-top: 0; }

/* Banket 6.5 */
.ev-cal { border-collapse: collapse; width: 100%; font-size: 13px; }
.ev-cal th, .ev-cal td { border: 1px solid var(--border); padding: 4px; vertical-align: top; min-width: 110px; }
.ev-cal .ev-hall { position: sticky; left: 0; background: var(--surface, #fff); min-width: 150px; }
.ev-cal .ev-hall small { display: block; }
.ev-cal .ev-today { background: var(--primary-soft); }
.ev-chip { display: block; border-radius: 6px; padding: 3px 6px; margin-bottom: 3px; text-decoration: none; color: #1e2a4a; background: #dbeefb; border-left: 3px solid #3ba7e6; }
.ev-chip small { display: block; font-weight: 600; }
.ev-chip.ev-tentative { background: #fff4d6; border-left-color: #e5a50a; }
.ev-chip.ev-done { background: #eceff3; border-left-color: #8a94a6; }
.ev-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ev-kpi { background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.ev-kpi span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ev-kpi b { font-size: 20px; }
.ev-kpi.ev-kpi-warn { border-color: #e5a50a; }

/* SPA 6.6 */
.spa-grid { border-collapse: collapse; width: 100%; font-size: 13px; }
.spa-grid th, .spa-grid td { border: 1px solid var(--border); padding: 3px 6px; min-width: 120px; height: 26px; vertical-align: top; }
.spa-grid tbody th { width: 60px; min-width: 60px; color: var(--muted); font-weight: 600; text-align: right; }
.spa-grid .spa-off { background: repeating-linear-gradient(45deg, transparent 0 6px, var(--border) 6px 7px); }
.spa-grid .spa-appt { background: #dbeefb; border-left: 3px solid #3ba7e6; }
.spa-grid .spa-appt small { display: block; color: var(--muted); }
.spa-grid .spa-done { background: #dcf5e7; border-left-color: #22a06b; }
.spa-grid .spa-noshow { background: #fde2e2; border-left-color: #b42318; }
.spa-free { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.spa-free > div { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.spa-free b { min-width: 140px; }
.spa-master { border-top: 1px solid var(--border); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.spa-days { display: flex; flex-wrap: wrap; gap: 10px; }

/* CRM 7.1 */
.crm-badge { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.crm-vip { background: #fff4d6; color: #8a5a00; border: 1px solid #e5a50a; }
.crm-black { background: #fde2e2; color: #b42318; border: 1px solid #b42318; }
.crm-line { margin: 2px 0 6px; font-size: 13.5px; }
.crm-black-reason { color: #b42318; font-weight: 600; margin-left: 6px; }
/* Xabar shabloni: .field ichida emas — boshqa maydonlar kabi (tungi rejimda qora fon emas, mavzu ranglari). */
.msg-tpl { width: 100%; box-sizing: border-box; font: inherit; line-height: 1.45; min-height: 72px; resize: vertical; padding: 11px 14px;
    border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); color: var(--text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.msg-tpl:hover { border-color: var(--border-strong); }
.msg-tpl:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }

/* Mehmon ilovasi 7.4 — xodim chati */
.staff-chat { display: flex; flex-direction: column; gap: 6px; max-height: calc(var(--vh, 1vh) * 60); overflow-y: auto; margin-bottom: 12px; }
.staff-msg { max-width: 75%; padding: 8px 12px; border-radius: 12px; }
.staff-msg small { display: block; font-size: 11px; color: var(--muted); }
.staff-msg.guest { align-self: flex-start; background: var(--primary-soft); }
.staff-msg.staff { align-self: flex-end; background: #dcf5e7; }
.inline-redeem { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
.lock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 10px; } .lock-grid label { display: flex; gap: 6px; align-items: center; } .lock-grid input { width: 90px; }

/* Ёрдамчи (8-faza) */
.ai-btn svg { color: var(--violet, var(--primary)); }
/* O'ng yon panel: kengligi --ai-w (300–720 px, brauzerda eslab qolinadi); kompyuterda ochiq bo'lsa sahifa chapga suriladi (body.ai-docked). */
.ai-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 880; width: min(var(--ai-w, 380px), 100vw);
    display: flex; flex-direction: column; background: var(--surface, #fff); border-left: 1px solid var(--border); box-shadow: -8px 0 32px rgba(30, 42, 74, .12); }
.ai-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 1; }
.ai-resize:hover, .ai-panel.resizing .ai-resize { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.ai-panel.resizing { user-select: none; }
@media (min-width: 1100px) { body.ai-docked { padding-right: var(--ai-w, 380px); } }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.ai-head b { margin-right: auto; }
.ai-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-msg { max-width: 92%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ai-msg a { text-decoration: underline; }
.ai-bot { align-self: flex-start; background: var(--primary-soft); }
.ai-user { align-self: flex-end; background: var(--primary); color: #fff; }
.ai-wait { opacity: .7; font-style: italic; }
.ai-err { background: #fde2e2; color: #b42318; }
.ai-fb { margin-top: 6px; display: flex; gap: 6px; font-size: 12px; }
.ai-fb button { border: 1px solid var(--border); background: transparent; border-radius: 8px; padding: 2px 8px; cursor: pointer; }
.ai-suggest { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 0; border-top: 1px solid var(--border); max-height: 40%; overflow-y: auto; }
.ai-suggest[hidden] { display: none; }
.ai-sug { text-align: left; border: 1px solid var(--border); background: var(--surface-2, #f5f7fb); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.ai-sug:hover { border-color: var(--primary); color: var(--primary); }
.ai-tag { display: inline-block; margin-bottom: 4px; padding: 1px 8px; border-radius: 999px; background: var(--surface, #fff); color: var(--primary); font-size: 11px; font-weight: 600; }
.ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.ai-form textarea { flex: 1; resize: none; }
.ai-answer-log { white-space: pre-wrap; margin: 6px 0 0; }
@media print { .ai-btn, .ai-panel { display: none !important; } body.ai-docked { padding-right: 0; } }
@media (max-width: 900px) { .ai-btn span { display: none; } .ai-resize { display: none; } }

/* Til tugmasi (9.1) */
.lang-switch { display: inline-flex; gap: 2px; margin: 0 8px 0 0; padding: 2px; border: 1px solid var(--border); border-radius: 999px; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: 600 11.5px/1 inherit; padding: 5px 7px; border-radius: 999px; cursor: pointer; }
.lang-switch button.on { background: var(--primary); color: #fff; }

/* Android ilovasi: eski versiyada — yangilash tugmasi (app.js) */
.apk-update { position: fixed; left: 16px; bottom: 16px; z-index: 60; box-shadow: 0 4px 14px rgba(15, 30, 60, .25); }

/* ---------- Telefonda pastki panel (ilovalardagi kabi) ---------- */
.tabbar { display: none; }
@media (max-width: 960px) {
    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; justify-content: space-around; align-items: stretch;
        background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(15, 30, 60, .06);
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    }
    .tabbar > a, nav.tabbar > button[type="button"] {
        flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        min-height: 52px; padding: 4px 2px; border: 0; border-radius: 10px; background: none; color: var(--muted);
        font: inherit; font-size: 11px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
    }
    .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
    .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tabbar > .active { color: var(--primary); background: var(--primary-soft); }
    body.has-tabbar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    nav.tabbar > button[type="button"]:hover { background: none; color: var(--muted); }
    nav.tabbar > button[type="button"].active { color: var(--primary); background: var(--primary-soft); }
    /* Tepadagi gamburger o'rniga — pastdagi «Меню»; ochilgan menyu pastki panelga qadar */
    body.has-tabbar .nav-burger { display: none; }
    body.has-tabbar .topbar .nav { max-height: calc(var(--vh, 1vh) * 100 - 72px - 64px); }
    body.has-tabbar .ai-panel { bottom: calc(60px + env(safe-area-inset-bottom)); }
    body.has-tabbar .apk-update { bottom: calc(74px + env(safe-area-inset-bottom)); }
}
@media print { .tabbar { display: none !important; } }
/* Telefonda: keng jadval o'z o'rnida yonga suriladi (app.js o'raydi); yorliqlar qatori sig'masa — suriladi. */
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
@media (max-width: 960px) {
    .segmented { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .segmented a { flex: none; }
}
/* Hujjat (hisob, vaucher, tasdiq) telefonda: sarlavha ustma-ust, nomlar so'z bo'yicha ko'chadi */
@media (max-width: 560px) {
    .pms-doc-brand { flex-wrap: wrap; min-width: 0; }
    .pms-doc-brand > *, .pms-doc-org { min-width: 0; overflow-wrap: anywhere; }
}
/* ===== Shaxmatka: qator balandligi QAT'IY — xona yorlig'i har doim o'z bron chizig'i bilan bir qatorda =====
   Nega: avval qatorlar «minmax(40px, auto)» edi — har qator balandligi ichidagi eng baland narsaga qarab o'sardi. Xona katagida
   eng ko'p narsa bor (raqam + tur kodi + nuqta + 14 px belgilar, matn esa Android tizim shrifti kattalashtirilganda — WebView
   textZoom — kattalashadi, belgilar esa yo'q), toifa sarlavhasi tor ustunda 2–3 qatorga o'ralardi; natijada qatorlar har xil
   balandlikda chiqib, ustundagi yorliqlar kataklar / chiziqlar to'riga mos kelmay qolardi (bo'sh joylar, «katta» yorliq).
   Endi: 1-qator (kunlar) — kontentga qarab, qolgan HAMMA qatorlar — bir xil --pms-row-h (em'da: shrift kattalashsa, hamma qator
   baravar kattalashadi). Yorliq ichidagi hech narsa o'ralmaydi va qatordan chiqmaydi (nowrap + overflow hidden + ellipsis),
   shuning uchun qator balandligini kontent hech qachon o'zgartirmaydi. JS (layout) qator raqamini yorliq, kataklar va chiziqlar
   uchun bitta data-r dan oladi — grid-row doim bir xil (DeskMobileDbTest tekshiradi). */
.pms-board { --pms-row-h: max(40px, 3em); grid-template-rows: minmax(var(--pms-row-h), auto); grid-auto-rows: var(--pms-row-h);
    -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.pms-board.dense { --pms-row-h: max(28px, 2.2em); }
#board > .pms-unit, #board > .pms-group, #board > .pms-corner-free { min-height: 0; overflow: hidden; line-height: 1.2; white-space: nowrap; }
#board > .pms-group { align-items: center; }
#board > .pms-group b, #board > .pms-unit > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#board > .pms-group small { flex: none; }
#board .pms-bar { min-height: 0; line-height: 1.2; -webkit-touch-callout: none; }
/* Sana sarlavhasi (1-qator) — yopishqoq: jadval o'z ichida tikka suriladi (pastda max-height), sarlavha va xona ustuni doim ko'rinadi. */
#board > .pms-day, #board > .pms-corner:first-child { position: sticky; top: 0; z-index: 4; }
#board > .pms-corner:first-child { z-index: 6; left: 0; }
#board > .pms-day { background: var(--surface-2); }
#board > .pms-day.today { background: var(--primary-soft); }
#board > .pms-day.weekend { background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface-2)); }
/* 7 kunlik ko'rinish: hamma kun ekranga sig'adi (telefonda ham). */
.pms-board[data-days="7"] { --pms-day-w: 34px; --pms-day-max: 1fr; }
/* Pastdan chiqadigan oyna (telefon): bron ma'lumoti va amallari — sichqoncha «hover» o'rniga. */
.pms-sheet-back { position: fixed; inset: 0; z-index: 94; background: rgba(15, 23, 42, .35); }
.pms-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; max-height: 70vh; max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface); color: var(--text); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(15, 23, 42, .25);
    padding: 8px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    display: grid; gap: 6px; font-size: 14px; }
.pms-sheet::before { content: ""; justify-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin-bottom: 4px; }
.pms-sheet b.pms-sheet-title { font-size: 16px; }
.pms-sheet .pms-sheet-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 8px;
    position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); background: var(--surface); padding: 8px 0 4px; }   /* past ekranda ham tugmalar doim ko'rinadi */
.pms-sheet .pms-sheet-acts .btn { width: 100%; min-width: 0; min-height: 44px; justify-content: center; white-space: normal; text-align: center; line-height: 1.2; padding: 6px 10px; }
@media (min-width: 700px) { .pms-sheet { left: 50%; right: auto; width: 560px; transform: translateX(-50%); } }
/* Sensor bilan belgilash: birinchi bosilgan katak (boshlanish) — kutish holati; jadvaldagi izoh. */
#board.pms-touch-pick a.pms-cell[data-pick-start] { background: color-mix(in srgb, var(--primary) 22%, transparent); }
.pms-touch-hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 85;
    padding: 8px 14px; border-radius: 999px; background: var(--text); color: var(--surface); font-size: 13px; font-weight: 600;
    box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); text-align: center; }
.pms-touch-hint button { all: unset; margin-left: 10px; text-decoration: underline; cursor: pointer; }

/* Telefon va planshet (pastki panel bor): jadval ekran balandligiga sig'adi — o'zi ichida ikki tomonga suriladi, kunlar sarlavhasi
   va xona ustuni yopishqoq; pastki panel («Дашборд, Шахматка…») oxirgi qatorlarni yopmaydi; chetdagi «kesik» (safe-area) hisobga olinadi. */
@media (max-width: 960px) {
    .pms-board-scroll { max-height: calc(var(--vh, 1vh) * 100 - 64px - 72px - env(safe-area-inset-bottom) - 12px);
        max-height: calc(100dvh - 64px - 72px - env(safe-area-inset-bottom) - 12px); min-height: 220px;
        overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-padding-left: var(--pms-unit-w); }
    .pms-board { --pms-unit-w: 132px; }
    #board, #board * { -webkit-user-select: none; user-select: none; }
    #board > .pms-unit { padding: 2px 6px; gap: 4px; }
    #board .pms-unit-cat { display: block; flex: 1 1 auto; min-width: 0; font-size: 10.5px; color: var(--muted); font-weight: 600;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #board .pms-unit-marks .pms-ind.ic-stay, #board .pms-unit-marks .pms-ind[class*="fl-"] { display: none; }
    .container.pms-desk { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
}
/* Telefon tik holatda: xona ustuni ixcham (raqam · tur kodi · nuqta), kunlar kamida 44 px — ekranda ~5 kun, qolgani yonga suriladi. */
@media (max-width: 560px) {
    .pms-board { --pms-unit-w: 96px; --pms-day-w: 44px; --pms-day-max: 1fr; font-size: 12px; }
    .pms-board[data-days="7"] { --pms-day-w: 30px; }
    #board .pms-unit-marks .pms-ind:not(.pms-hk-pill) { display: none; }
    #board > .pms-corner { padding: 4px 6px; font-size: 12px; }
    #board > .pms-group { padding: 4px 6px; gap: 4px; }
    #board > .pms-group small { display: none; }
    #board .pms-bar { margin: 5px 1px; padding: 0 5px; font-size: 11.5px; }
    #board a.pms-bar > small { display: none; }
    .desk-days .desk-days-long { display: none; }
}
/* Telefon yotiq holatda (balandligi kichik): sarlavha yopishmaydi, pastki panel ixcham — jadvalga ko'proq joy. */
@media (max-width: 960px) and (max-height: 500px) {
    body:has(#board) .topbar { position: static; }
    .pms-board-scroll { max-height: calc(var(--vh, 1vh) * 100 - 48px - env(safe-area-inset-bottom) - 8px);
        max-height: calc(100dvh - 48px - env(safe-area-inset-bottom) - 8px); min-height: 180px; }
    .tabbar > a, nav.tabbar > button[type="button"] { min-height: 38px; flex-direction: row; gap: 6px; padding: 2px 4px; }
    .tabbar svg { width: 20px; height: 20px; }
    body.has-tabbar { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
    .pms-touch-hint { bottom: calc(60px + env(safe-area-inset-bottom)); }
}
/* Telefon/planshet: sarlavha blur'siz — aks holda ichidagi pastki panel (fixed) sarlavhaga yopishib qoladi (app.js yuklanmasa ham pastda turadi). */
@media (max-width: 960px) {
    .topbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}
/* Sensorli ekran (telefon, planshet): bosilgandan keyin «hover» uslubi yopishib qolmasin — tugma odatiy ko'rinishiga qaytadi. */
@media (hover: none) {
    .btn-primary:hover { transform: none; box-shadow: 0 4px 14px rgba(30, 58, 138, .28); }
    .btn-telegram:hover { transform: none; }
    .btn-secondary:hover { color: var(--text); background: var(--surface); border-color: var(--border); }
    .btn-danger:hover { color: var(--danger); background: var(--surface); }
    .btn-task:hover { border-color: var(--border); background: var(--surface); }
    .btn:active { transform: scale(.98); }
}

/* ---------- Хоналар ҳолати: рўйхат (қатор босилса — очилади) ---------- */
.hk-tools { display: grid; gap: 10px; margin-bottom: 12px; }
.hk-search { width: 100%; max-width: 420px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.hk-search:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.hk-chips { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.hk-chip { flex: none; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
    color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.hk-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.hk-list { display: flex; flex-direction: column; gap: 8px; }
details.hk-room { display: block; padding: 0; gap: 0; }
details.hk-room > .hk-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main badge" "flags flags";
    align-items: center; gap: 4px 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
details.hk-room > .hk-sum::-webkit-details-marker { display: none; }
.hk-sum-main { grid-area: main; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hk-sum-main b { font-size: 16px; white-space: nowrap; }
.hk-sum-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-sum .badge { grid-area: badge; }
.hk-sum-flags { grid-area: flags; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; align-items: center; }
.hk-sum-flags:empty { display: none; }
.hk-flag { color: var(--muted); }
.hk-since { margin-left: auto; font-size: 12px; }
details.hk-room[open] > .hk-sum { border-bottom: 1px solid var(--border); }
details.hk-room > .hk-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; }
details.hk-room:not([open]):hover { background: var(--surface-2); }
@media (hover: none) { details.hk-room:not([open]):hover { background: var(--surface); } }
.hk-none { margin: 8px 2px; }

/* NFC yorliq o'qildi, lekin mehmonxona sahifasi ochilmagan — vaqtinchalik xabar */
.nfc-note { position: fixed; left: 16px; right: 16px; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 1200; box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.15)); }

/* Agentlar: Trakt'ir agenti rejasi (qaysi jadvallar, qaysi sanadan) */
.agent-plan { display: grid; gap: 6px; margin-top: 8px; max-width: 420px; }
.agent-plan label { display: grid; gap: 3px; font-size: 13px; }
.agent-plan textarea { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; }
.agent-plan-view { display: grid; gap: 2px; margin-top: 8px; font-size: 12px; max-width: 420px; }
.agent-plan-view pre { margin: 0; white-space: pre-wrap; word-break: break-all; font-size: 11px; background: var(--surface-2, #f4f6fa); padding: 6px 8px; border-radius: 8px; }
.agent-plan-edit summary { cursor: pointer; font-size: 12px; color: var(--primary, #1d3a8a); margin-top: 4px; }
.user-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.nav-menu-note { margin: 4px 12px 8px; font-size: 13px; max-width: 300px; white-space: normal; }

/* ===== Qo'llanma (/manual) ===== */
.manual-page .page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.manual-toc ol { margin: 4px 0 4px 18px; padding: 0; }
.manual-toc > ol > li { margin: 6px 0; font-weight: 600; }
.manual-toc ol ol li { font-weight: 400; font-size: 14px; }
.manual-chapter { margin-top: 18px; }
.manual-chapter > h2 { margin-top: 0; }
.manual-body h3 { margin: 22px 0 6px; color: var(--primary); font-size: 17px; }
.manual-body h4 { margin: 12px 0 4px; font-size: 15px; }
.manual-body .scn { border-top: 1px solid var(--border); padding-top: 4px; margin-top: 14px; }
.manual-body .scn:first-of-type { border-top: 0; }
.manual-body .scn-meta { color: var(--muted); font-size: 13.5px; margin: 0 0 6px; }
.manual-body .note { background: var(--primary-soft); border-left: 3px solid var(--primary); padding: 8px 12px; border-radius: 6px; color: inherit; font-size: 14px; }
.manual-body .note.warn { background: var(--warning-soft, #fff4e0); border-left: 3px solid var(--warning, #d08a00); padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.manual-body table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 14px; }
.manual-body td, .manual-body th { border: 1px solid var(--border); padding: 6px 8px; vertical-align: top; text-align: left; }
.manual-role select { min-width: 200px; }
@media print {
    .manual-chapter { break-before: page; box-shadow: none; border: 0; }
    .manual-toc { box-shadow: none; border: 0; }
    .manual-body .scn { break-inside: avoid-page; }
}
/* Инструкция: qidiruv maydoni — placeholder to'liq ko'rinsin («Қўлланма» tugmasi yonida ham). */
.help-search { width: 360px; max-width: 100%; min-height: 40px; padding: 8px 12px; }
.page-actions:has(.help-search) { align-items: center; }
/* POS: stop-list (ofitsiant / oshpaz) */
.pos-stop { margin-top: 10px; }
.pos-stop summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.pos-stop-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }
/* Bron kartasi: shikoyatlar va onlayn check-in havolasi */
.pms-complaint { padding: 6px 0; border-bottom: 1px solid var(--border); }
.pms-complaint.open { border-left: 3px solid var(--danger, #c0392b); padding-left: 8px; }
.pms-complaint.req-open { border-left: 3px solid var(--primary); padding-left: 8px; }
.checkin-link input { min-width: 260px; flex: 1; }
/* «Андозага қайтариш» (PmsPresets) — sarlavha yoki ro'yxat yonida, kichik. */
.preset-reset { display: inline-flex; margin: 0; }
.preset-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
/* Jadval qatoridagi «Таҳрирлаш» (details) va «Ўчириш» — yonma-yon; ochilgan forma qator ostida. */
td.nowrap { white-space: nowrap; }
td.nowrap > .preset-reset, td.nowrap > .row-edit { display: inline-block; vertical-align: top; margin-right: 4px; }
.row-edit > summary { list-style: none; cursor: pointer; }
.row-edit > summary::-webkit-details-marker { display: none; }
.row-edit[open] > form { margin-top: 6px; white-space: normal; }

/* ---------- Режа ва факт ---------- */
.plan-page .plan-table th.num, .plan-page .plan-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.plan-page .pf-up { color: var(--success); font-weight: 600; }
.plan-page .pf-down { color: var(--danger); font-weight: 600; }
.plan-page .pf-total td { border-top: 2px solid var(--border); background: var(--surface-2); }
.plan-page .pf-cell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
/* Jadval kartaga sig'sin: sarlavhalar ikki qatorga o'tadi, kataklar ixcham, mehmonxona nomi ham o'raladi. */
.plan-page .plan-table th { white-space: normal; line-height: 1.3; vertical-align: bottom; }
.plan-page .plan-table th, .plan-page .plan-table td { padding: 12px 10px; }
.plan-page .plan-table td:first-child { white-space: normal; min-width: 130px; }
.plan-page .pf-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.plan-page .pf-bar span { display: block; height: 100%; border-radius: 999px; transition: width var(--t) var(--ease); }
.plan-page .pf-good { background: var(--success); }
.plan-page .pf-mid { background: var(--warning); }
.plan-page .pf-bad { background: var(--danger); }
.plan-page .plan-charts { display: grid; grid-template-columns: 1fr 1.6fr; gap: 18px; margin: 18px 0; }
.plan-page .plan-charts .card { margin: 0; min-width: 0; }
.plan-page .plan-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.plan-page .plan-ops > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.plan-page .plan-ops strong { font-size: 18px; }
.plan-page .plan-ops small { color: var(--muted); }
.plan-page form.inline { display: inline; }
.plan-page .plan-grid-wrap { padding: 0; }
.plan-page .plan-grid th, .plan-page .plan-grid td { padding: 6px 6px; }
.plan-page .plan-grid thead th { text-align: center; }
.plan-page .plan-grid tbody th { text-align: left; min-width: 190px; position: sticky; left: 0; background: var(--surface); z-index: 1; white-space: normal; }
.plan-page .plan-grid .plan-cell { width: 112px; text-align: right; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.plan-page .plan-grid .plan-sum { text-align: right; font-weight: 700; min-width: 120px; }
.plan-page .plan-grid tr.plan-count th { font-style: italic; }
@media (max-width: 900px) {
    .plan-page .plan-charts { grid-template-columns: 1fr; }
}

/* Ko'rsatkich kartochkasi — tugma: bosilganda batafsil oyna (hotel-details.html). */
.stat-click { cursor: pointer; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
.stat-click:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow); }
.stat-click:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.stat-click:active { transform: scale(.99); }
.det-body { max-height: calc(var(--vh, 1vh) * 72); overflow-y: auto; }
.det-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 10px; }
.det-sum > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.det-sum span { color: var(--muted); font-size: 12px; }
.det-sum b { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.det-title { margin: 16px 0 6px; font-size: 14px; }
.det-table th, .det-table td { padding: 8px 10px; white-space: normal; }
.det-table td.num, .det-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.det-table tr.det-total td { font-weight: 700; border-top: 2px solid var(--border); }
.det-bar { display: inline-block; width: 60px; height: 6px; margin-right: 8px; vertical-align: middle; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.det-bar span { display: block; height: 100%; background: var(--primary); }
.det-scroll { max-height: 340px; overflow-y: auto; }
@media (max-width: 640px) { .det-bar { display: none; } }
.modal-head .det-export { margin-left: auto; margin-right: 8px; }
.plan-page .send-hints { margin: 10px 0 4px; padding-left: 18px; display: grid; gap: 4px; }
/* «Режа ва факт» → Telegram: qabul qiluvchilar (guruh / shaxs) — har biri o'z soati, kunlari va mehmonxonalari. */
.plan-page .recipients { display: grid; gap: 10px; margin: 12px 0; }
.plan-page .recipient { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.plan-page .recipient.is-off { opacity: .65; }
.plan-page .recipient-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.plan-page .recipient-sent { font-size: 12px; }
.plan-page .recipient-actions { margin-left: auto; display: flex; gap: 6px; }
.plan-page .recipient-form { display: grid; gap: 8px; }
.plan-page .recipient-reports { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.plan-page .recipient-reports input[type=time] { width: 110px; }
.plan-page .recipient-days { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.plan-page .recipient-days .day { margin: 0; }
.plan-page .recipient-reports > label.check:first-child { min-width: 190px; }
.plan-page .recipient-reports + .recipient-reports { margin-top: 6px; }
.plan-page .recipient-hotels summary { cursor: pointer; color: var(--primary); }
.plan-page .recipient-hotels .check { display: inline-flex; margin: 4px 14px 0 0; }
.plan-page .recipient-form > .btn { justify-self: start; }
.plan-page .recipient-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
/* «Режа ва факт»: kartochkalar bir-biriga yopishmasin. */
.plan-page > .card + .card, .plan-page > .card + .plan-charts, .plan-page > .plan-charts + .card { margin-top: 20px; }
/* Agent jim — dashboard va bosh sahifadagi ogohlantirish. */
.agent-silent { border-color: var(--warning, #c98a00); }
.agent-silent-list { margin: 6px 0 4px; padding-left: 18px; display: grid; gap: 4px; }
/* O'zgarishlar jurnali */
.changes-page .changes-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 14px; }
.changes-page .change-card + .change-card, .changes-page .changes-filter + .hint { margin-top: 14px; }
.changes-page .change-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.changes-page tr.changed td { font-weight: 600; }
.changes-page .change-card { margin-top: 14px; }

/* Qarzdor bron: qizil (holat rangi ustidan), qalqib chiquvchi oynada «Қарздор». */
a.pms-bar.debt, .st-debt { background-color: var(--danger); }
a.pms-bar.debt { box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 45%, transparent), var(--shadow-sm); }
a.pms-bar.debt.grp { box-shadow: inset 5px 0 0 var(--grp), 0 0 0 2px color-mix(in srgb, var(--danger) 45%, transparent); }

/* Har mehmonga alohida hisob: har biri — alohida varaq. */
.guest-bill + .guest-bill { margin-top: 18px; }
@media print { .guest-bill { break-after: page; } .guest-bill:last-of-type { break-after: auto; } }
/* Guruh jadvali: keng oyna, ixcham maydonlar. */
#scheduleModal { width: min(960px, calc(100vw - 24px)); }
.schedule-table input { width: 100%; min-width: 0; padding: 6px 8px; font-size: 13px; }
.schedule-table td:nth-child(2) { min-width: 180px; }
.schedule-table input[type=time] { min-width: 92px; }
.schedule-table input[type=date] { min-width: 136px; }
/* Erta/kech siyosati pog'onalari (PMS sozlamalari). */
.time-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px 20px; }
.time-rules-col { display: flex; flex-direction: column; gap: 6px; }
.time-rule { display: grid; grid-template-columns: 124px 1fr 84px; gap: 6px; }
.time-rule[hidden] { display: none; }
.time-rule input[type=time] { padding-left: 10px; padding-right: 6px; font-variant-numeric: tabular-nums; }
.time-rule-add { align-self: flex-start; }
.time-rule-val { position: relative; display: block; min-width: 0; }
.time-rule-val input { width: 100%; padding-right: 34px; }
.time-rule-unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px;
    color: var(--muted); pointer-events: none; }
.time-rule-val input:disabled { opacity: .45; }
.time-rule input, .time-rule select { min-width: 0; }
.rate-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.rate-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
/* Yangi bron: qatorning «Бошқача» — o'z mehmoni, sanalari, soati, narxi. */
.pms-room-more { grid-column: 2 / -1; font-size: 13px; }
.pms-room-more > summary { cursor: pointer; color: var(--primary); width: max-content; }
.pms-room-more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px 10px; margin-top: 8px; }
.pms-room-more-grid > .field:first-child { grid-column: span 2; }
.pms-room-more-grid input { width: 100%; min-width: 0; }
@media (max-width: 760px) { .pms-room-more { grid-column: 1 / -1; } .pms-room-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Qarzdor: «Бугун» ro'yxatlari va guruh jadvalida qizil (shaxmatkadagi qizil chiziq bilan bir qoida). */
.pms-item.debt { border-left: 3px solid var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
tr.debt-row > td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
/* Maxfiylik siyosati (ochiq sahifa). */
.privacy-page { max-width: 820px; padding: 24px 16px 48px; }
.privacy-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.privacy-text h1 { font-size: 28px; margin: 0 0 6px; }
.privacy-text h2 { font-size: 18px; margin: 22px 0 6px; }
.privacy-text p, .privacy-text li { line-height: 1.6; }
/* Restoran tafsiloti: kategoriya qatori — qalin, taomlar — ichkariroq. */
.rest-items tr.rest-cat td { background: var(--surface-2); border-top: 1px solid var(--border); }
.rest-items td.rest-item { padding-left: 22px; }

/* Hisobot jadvalida drill-down havolasi: raqam bosilsa — tarkibi */
.rt a.rt-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.rt a.rt-link:hover { color: var(--accent, #2563eb); text-decoration-style: solid; }

/* Bank ko'chirmasi: tekshiruv natijasi — ixcham belgilar, bosilsa to'liq matn (qator cho'zilmasin) */
.check-pop { position: relative; }
.check-pop > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.check-pop > summary::-webkit-details-marker { display: none; }
.check-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.check-chip { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.check-chip.is-ok { color: var(--success); }
.check-chip.is-warn { background: var(--warning-soft); color: var(--warning); }
.check-list-full { position: absolute; z-index: 20; right: 0; top: calc(100% + 6px); width: min(420px, 80vw); margin: 0; padding: 10px 12px 10px 28px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
    font-size: 13px; line-height: 1.45; white-space: normal; }
.check-list-full li { margin: 2px 0; }
.check-list-full li.is-ok::marker { content: "✓  "; color: var(--success); }
.check-list-full li.is-warn::marker { content: "⚠  "; color: var(--warning); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 220px; }
/* Jadval katagida qiymat + kichik «✎» tugmasi (tahrirlash — umumiy oynada) */
.cell-edit { display: flex; align-items: flex-start; gap: 6px; }
.btn-icon { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 6px; width: 26px; height: 26px;
    line-height: 1; font-size: 13px; cursor: pointer; padding: 0; }
.btn-icon:hover, .btn-icon:focus-visible { color: var(--primary); border-color: var(--primary); }
.warn-text { color: var(--warning); font-weight: 600; }

/* Mehmonxona pochtasi */
.mail-table tr.is-new td { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.mail-table td.nowrap { white-space: nowrap; }
.mail-meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.mail-meta dt { color: var(--muted); }
.mail-meta dd { margin: 0; word-break: break-word; }
.mail-atts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.mail-frame { width: 100%; border: 0; min-height: 420px; background: #fff; border-radius: 8px; }
.mail-text { white-space: pre-wrap; word-break: break-word; font: inherit; margin: 0; }
/* Korporativ pochta: «manzil @ domen» — manzil maydoni tor bo'lib qolmasin. */
.inline-fields.corp-addr { align-items: center; }
.inline-fields.corp-addr input { flex: 1 1 45%; min-width: 8rem; }
.inline-fields.corp-addr select { flex: 1 1 55%; min-width: 0; width: auto; }

/* Shaxmatkadagi OTA belgisi (BDC, EXP…) — kanaldan kelgan bronlar */
a.pms-bar > i.pms-ota { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .02em; padding: 0 4px; border-radius: 4px;
    background: rgba(255, 255, 255, .28); flex: none; line-height: 15px; }

/* AI харажатлари: пакет формалари жадвал ичида ихчам */
.ai-budget-form { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-bottom: 0; }
.ai-budget-form input { padding: 4px 6px; font-size: .85rem; }
/* «AI сарфи» (меҳмонхона) */
.ai-usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.ai-usage-grid .card { margin-bottom: 0; }
.ai-usage-table { width: 100%; border-collapse: collapse; }
.ai-usage-table td { padding: 6px 4px; border-bottom: 1px solid var(--border, #e5e7eb); }
.ai-usage-table td.num { text-align: right; white-space: nowrap; }
/* Почта паролини тиклаш: раҳбар рухсатини кутиш — тасдиқ рақами */
.mpw-check { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 16px 0; padding: 16px; border-radius: 12px;
    background: var(--surface-2, #f3f4f6); }
.mpw-check span { font-size: .85rem; opacity: .8; }
.mpw-check b { font-size: 2.4rem; letter-spacing: .35em; font-variant-numeric: tabular-nums; }

/* Noutbuk kengligi (≤1500 px): yuqori panel sig'sin — foydalanuvchi ismi yashiriladi (belgi va «Чиқиш» qoladi), «Чиқиш» kesilmasin. */
@media (min-width: 961px) and (max-width: 1500px) {
    .topbar { gap: 18px; }
    .topbar .user-box .name { display: none; }
}

/* ---------- Ish rejimi tanlagichi (Платформа / mehmonxona) ---------- */
.ws-switch { position: relative; flex: none; margin-left: auto; }
.ws-switch + .user-box { margin-left: 12px; }
.ws-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; max-width: 220px; cursor: pointer;
    padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
    font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.ws-switch summary::-webkit-details-marker { display: none; }
.ws-switch summary:hover, .ws-switch[open] summary { border-color: var(--primary); }
.ws-switch .ws-name { overflow: hidden; text-overflow: ellipsis; }
.ws-switch .ws-caret { color: var(--muted); font-size: 11px; }
.ws-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 300px; max-height: 70vh; overflow: auto;
    padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.ws-hint { margin: 2px 6px 8px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.ws-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px;
    background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ws-item:hover { background: var(--surface-2, rgba(37, 99, 235, .06)); }
.ws-item.on { background: rgba(37, 99, 235, .1); color: var(--primary); font-weight: 600; }
.ws-item small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
@media (max-width: 1500px) and (min-width: 961px) { .ws-switch summary { max-width: 160px; } }
@media (max-width: 960px) {
    .ws-switch { margin-left: auto; }
    .ws-switch + .user-box { margin-left: 8px; }
    .ws-switch summary { max-width: 130px; padding: 6px 10px; font-size: 12.5px; }
    .ws-menu { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
}

/* ---------- Ixcham o'ng blok: Ёрдамчи/Справка — belgi, til — «ЎЗ ▾», foydalanuvchi — avatar menyusi ---------- */
.topbar .help-btn { width: 38px; padding: 0; justify-content: center; }
.topbar .help-btn span { display: none; }
.lang-menu, .user-menu { position: relative; flex: none; }
.lang-menu summary, .user-menu summary { list-style: none; cursor: pointer; }
.lang-menu summary::-webkit-details-marker, .user-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px; border: 1px solid var(--border);
    border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 700; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--primary); }
.lang-menu .lang-switch { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; display: flex; flex-direction: column; gap: 2px;
    margin: 0; padding: 6px; min-width: 140px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.lang-menu .lang-switch button { text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text); }
.lang-menu .lang-switch button:hover { background: var(--surface-2, rgba(37, 99, 235, .06)); }
.lang-menu .lang-switch button.on { background: rgba(37, 99, 235, .1); color: var(--primary); }
.user-menu summary.user-link { padding: 3px 8px 3px 3px; gap: 4px; }
.user-menu summary .name { display: none; }
.user-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; padding: 6px;
    border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.user-menu-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.user-menu-head b { color: var(--text); font-size: 14px; white-space: normal; }
.user-menu-head small { color: var(--muted); font-size: 12px; }
.user-menu-item { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text);
    font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.user-menu-item:hover { background: var(--surface-2, rgba(37, 99, 235, .06)); color: var(--text); }
.user-menu-exit { color: var(--danger, #c0392b); }
.user-menu form { margin: 0; }
.topbar .user-box .user-menu form { display: block; }
.topbar .user-box { gap: 8px; }
/* Ixcham blokdan keyin joy ko'p — mehmonxona nomi to'liqroq; telefonda — faqat belgi (nomi menyuda). */
.ws-switch summary { max-width: 260px; }
.ws-switch + .user-box { margin-left: 8px; }
@media (max-width: 1500px) and (min-width: 961px) { .ws-switch summary { max-width: 220px; } }
@media (max-width: 600px) {
    .ws-switch .ws-name { display: none; }
    .ws-switch summary { padding: 6px 9px; }
    .topbar .help-btn { width: 34px; height: 34px; }
    .lang-menu summary { height: 34px; padding: 0 7px; font-size: 12px; }
    .user-menu summary.user-link { padding: 2px; }
    .user-menu summary .ws-caret { display: none; }
    .topbar .user-box { gap: 6px; }
}
/* Planshet / kichik noutbuk (961–1279): rejim — faqat belgi, menyu bandlari zichroq — hammasi bir qatorda. */
@media (min-width: 961px) and (max-width: 1279px) {
    .ws-switch .ws-name { display: none; }
    .topbar .nav > a, .topbar .nav-toggle { padding-left: 9px; padding-right: 9px; }
    .topbar { gap: 12px; }
}
/* 961–1180: o'zbekcha bandlar uzun + Ёрдамчи tugmasi — logo faqat belgi, joy menyuga. */
@media (min-width: 961px) and (max-width: 1180px) {
    .brand .brand-logo.brand-on-light { display: none; }
    .brand .brand-mark.brand-on-light { display: block; }
    .ws-switch + .user-box { margin-left: 4px; }
}
@media (min-width: 961px) and (max-width: 1180px) {
    :root[data-theme="dark"] .brand .brand-logo.brand-on-dark { display: none; }
    :root[data-theme="dark"] .brand .brand-mark.brand-on-dark { display: block; }
}
/* «Жами» ko'rsatkichlari (5 ta): planshetda 3 + 2 (yolg'iz qolgan band va ortiqcha chiziq yo'q), telefonda oxirgi toq band — to'liq qator. */
@media (min-width: 721px) and (max-width: 900px) {
    .flow-grid:has(> .flow-item:nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
    .flow-grid:has(> .flow-item:nth-child(5)) > .flow-item:nth-child(3n+1) { border-left: 0; padding-left: 0; }
}
@media (max-width: 720px) {
    .flow-grid > .flow-item:last-child:nth-child(odd) { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--border); }
}
/* Bannerlar (ko'rish rejimi, sinov davri, test rejimi) — ixcham: bitta ingichka qator, ekranni egallamasin. */
.passive-banner { padding: 3px 12px; font-size: 12.5px; line-height: 1.35; }
.impersonate-banner { gap: 10px; padding-top: 2px; padding-bottom: 2px; }
.impersonate-banner .btn { padding: 2px 10px; min-height: 0; height: 22px; font-size: 12px; line-height: 1; border-radius: 6px; }
@media (max-width: 600px) {
    .passive-banner { font-size: 11.5px; padding: 3px 8px; }
    .impersonate-banner { gap: 6px; flex-wrap: wrap; }
}
.topbar:has(.passive-banner) { row-gap: 0; }
.topbar:has(.passive-banner) { padding-top: 8px; padding-bottom: 0; }
.topbar:has(.passive-banner) > .passive-banner:last-child, .topbar:has(.passive-banner) .passive-banner { margin-top: 8px; }
.topbar:has(.passive-banner) .passive-banner + .passive-banner { margin-top: 0; }
@media (max-width: 600px) {
    .impersonate-banner { flex-wrap: nowrap; }
    .impersonate-banner .imp-long { display: none; }
    .impersonate-banner > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .impersonate-banner .btn { flex: none; }
}

/* ---------- Ресепшн: «Бугун» — shaxmatka ustida ixcham qator (tugma + ochiladigan ro'yxat), shaxmatka to'liq kenglikda ---------- */
.pms-desk .pms-layout, .pms-desk .pms-layout.side-hidden { display: block; }
.pms-desk .pms-side-resize, .pms-desk .pms-side-rail, .pms-desk .pms-side-toggle { display: none !important; }
.pms-desk .pms-side { position: relative; top: auto; max-height: none; overflow: visible; display: flex; flex-direction: row; align-items: center;
    flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; background: none; border: 0; box-shadow: none; }
.pms-desk .pms-side-head { padding: 0 4px 0 0; gap: 6px; }
.pms-desk .pms-side-head b { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pms-desk .pms-side-head .tip { display: none; }
.pms-desk .pms-side-body { display: flex !important; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.pms-desk .pms-side .pms-fold { position: relative; margin: 0; padding: 0; border-radius: 999px; background: var(--surface);
    border: 1px solid var(--border); box-shadow: none; transform: none; }
.pms-desk .pms-side .pms-fold > summary { margin: 0; padding: 6px 12px 6px 10px; gap: 6px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.pms-desk .pms-side .pms-fold > summary .tip, .pms-desk .pms-side .pms-fold > summary .pms-fold-chev { display: none; }
.pms-desk .pms-side .pms-fold > summary .muted { margin-left: 2px; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2);
    color: var(--text); font-weight: 700; font-size: 12.5px; text-align: center; }
.pms-desk .pms-side .pms-fold:hover, .pms-desk .pms-side .pms-fold[open] { border-color: var(--primary); }
.pms-desk .pms-side .pms-fold[open] > summary { color: var(--primary); }
.pms-desk .pms-side .pms-fold > summary::before { font-size: 15px; line-height: 1; }
.pms-desk [data-fold="arrivals"] > summary::before { content: "🛬"; }
.pms-desk [data-fold="departures"] > summary::before { content: "🛫"; }
.pms-desk [data-fold="inhouse"] > summary::before { content: "🛏"; }
.pms-desk [data-fold="pending"] > summary::before { content: "⏳"; }
.pms-desk [data-fold="notready"] > summary::before { content: "🧹"; }
.pms-desk [data-fold="lateout"] > summary::before { content: "⏰"; }
/* Diqqat talab qiladiganlar — rangli */
.pms-desk .pms-side .pms-alert-list { border-color: color-mix(in srgb, var(--warning, #d97706) 55%, var(--border)); background: color-mix(in srgb, var(--warning, #d97706) 10%, var(--surface)); }
.pms-desk .pms-side .pms-alert-list > summary .muted { background: var(--warning, #d97706); color: #fff; }
/* Ochiladigan ro'yxat */
.today-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 45; width: min(360px, calc(100vw - 32px)); max-height: 60vh; overflow: auto;
    display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
    box-shadow: 0 14px 36px rgba(15, 23, 42, .18); }
.today-pop.to-left { left: auto; right: 0; }
.today-pop > .muted { margin: 4px 6px; }
/* Sarlavha amallari — belgilar, ustiga borganda izoh */
.icon-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer;
    transition: border-color .15s, color .15s, background .15s; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); outline: none; }
.icon-btn[aria-label]::after { content: attr(aria-label); position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: max-content; max-width: 240px;
    padding: 7px 10px; border-radius: 8px; background: #0f172a; color: #fff; font-size: 12.5px; font-weight: 500; line-height: 1.35; text-align: left;
    white-space: normal; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); opacity: 0; visibility: hidden; transform: translateY(-3px);
    transition: opacity .12s, transform .12s; pointer-events: none; }
.icon-btn:hover::after, .icon-btn:focus-visible::after { opacity: 1; visibility: visible; transform: none; transition-delay: .15s; }
/* Sarlavha zichroq: tavsif yashirin (sahifa nomi aniq), nom va amallar bir qatorda */
.pms-desk > .page-head { margin-bottom: 14px; align-items: center; }
.pms-desk > .page-head .subtitle { display: none; }
@media (max-width: 600px) {
    .pms-desk .pms-side .pms-fold > summary { padding: 5px 10px 5px 8px; font-size: 12.5px; }
    .icon-btn { width: 38px; height: 38px; }
}
/* Telefonda «Бугун» — faqat belgi + son (nomi — ustiga borganda / ro'yxat ochilganda), hammasi bir qatorda. */
@media (max-width: 600px) {
    .pms-desk .pms-side { gap: 6px; flex-wrap: nowrap; }
    .pms-desk .pms-side-head { display: none; }
    .pms-desk .pms-side-body { flex-wrap: wrap; gap: 6px; }
    .pms-desk .pms-side .pms-fold > summary { font-size: 0; padding: 5px 8px; gap: 4px; }
    .pms-desk .pms-side .pms-fold > summary::before { font-size: 16px; }
    .pms-desk .pms-side .pms-fold > summary .muted { font-size: 12.5px; }
    .pms-desk .pms-side .pms-fold { position: static; }
    .today-pop { left: 16px; right: 16px; width: auto; top: auto; margin-top: 6px; }
    .pms-desk .pms-side { position: relative; }
}
/* Тугма изоҳи: фақат сичқонча устида ёки клавиатура фокусида (bosilgandan keyin qolib, бошқа изоҳ билан устма-уст тушмасин). */
.icon-btn:focus:not(:focus-visible):not(:hover)::after { opacity: 0; visibility: hidden; }
.page-head .icon-btn:hover, .page-head .icon-btn:focus-visible { z-index: 80; }
@media (max-width: 600px) {
    .pms-desk .pms-side-body { gap: 5px; }
    .pms-desk .pms-side .pms-fold > summary { padding: 4px 7px 4px 6px; gap: 3px; }
    .pms-desk .pms-side .pms-fold > summary .muted { min-width: 18px; padding: 1px 5px; }
}
@media (max-width: 600px) {
    .pms-desk .pms-side-body { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .pms-desk .pms-side-body::-webkit-scrollbar { display: none; }
    .pms-desk .pms-side .pms-fold { flex: none; }
}
.today-pop-title { margin: 0 4px 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- PMS созламалари: ro'yxat → bosilganda modal ---------- */
.pms-settings .pms-settings-grid { display: flex; flex-direction: column; gap: 0; }
.pms-settings section.set-item { display: block; padding: 0; margin: 0 0 8px; overflow: visible; }
.pms-settings .pms-settings-grid section.set-item { margin-bottom: 8px; }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; border: 0; background: transparent; color: var(--text);
    font: inherit; text-align: left; cursor: pointer; border-radius: inherit; }
.set-row:hover { background: var(--surface-2); }
.set-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.set-row-text b { font-size: 15px; }
.set-row-text small { color: var(--muted); font-size: 13px; }
.set-row-chev { flex: none; font-size: 22px; line-height: 1; color: var(--muted); }
.set-row:hover .set-row-chev { color: var(--primary); }
.set-item > .set-body { display: none; }
/* Ochiq bo'lim — markazda oyna */
.set-shade { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(13, 17, 27, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
body.set-modal { overflow: hidden; }
body.set-modal .set-shade { display: block; }
.set-item.set-open > .set-body { display: flex; flex-direction: column; gap: 12px; position: fixed; z-index: 91; left: 50%; top: 50%;
    transform: translate(-50%, -50%); width: min(640px, calc(100vw - 24px)); max-height: calc(var(--vh, 1vh) * 100 - 48px); overflow: auto;
    padding: 22px 22px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(15, 23, 42, .3); animation: modalIn .22s var(--ease); }
.set-item.set-open > .set-body .card-title { margin: 0; font-size: 18px; padding-right: 36px; }
.set-close { position: absolute; top: 14px; right: 14px; }
.set-foot { position: sticky; bottom: -18px; display: flex; justify-content: flex-end; gap: 8px; margin: 6px -22px -18px; padding: 12px 22px;
    background: var(--surface); border-top: 1px solid var(--border); }
.set-item.set-open > .set-body .form-grid { grid-template-columns: minmax(0, 1fr); }
.pms-settings .pms-settings-grid { align-items: stretch; }
/* Kirish animatsiyasi (transform) fixed oynani bo'limga «qamab» qo'ymasin. */
.pms-settings section.set-item { animation: none; opacity: 1; transform: none; }
.set-item.set-open > .set-body { width: min(820px, calc(100vw - 24px)); }
/* v2: bo'limlar — ikonali qatorlar (2 ustun), guruh sarlavhasi, hozirgi holat belgisi */
.pms-settings .pms-settings-grid, .pms-settings .set-hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; margin-bottom: 18px; }
.pms-settings section.set-item, .pms-settings .pms-settings-grid section.set-item { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.pms-settings .set-row.bk-row { width: 100%; height: 100%; }
.pms-settings .set-row .bk-row-text small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.set-group { margin: 22px 2px 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.set-chip { flex: none; max-width: 42%; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: var(--surface-2); color: var(--text); font-variant-numeric: tabular-nums; }
.set-chip.ok { background: var(--success-soft, color-mix(in srgb, var(--success) 14%, transparent)); color: var(--success); }
.set-chip.off { color: var(--muted); }
.set-chip.warn { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.set-item.set-open > .set-body .pms-set-head { display: flex; align-items: center; gap: 12px; padding-right: 36px; }
.set-item.set-open > .set-body .pms-set-head .bk-ic { width: 40px; height: 40px; border-radius: 12px; }
.set-item.set-open > .set-body > .alert { margin: 0; }
.pms-now li[data-open][role=button] { cursor: pointer; border-radius: 8px; margin: -3px -6px; padding-top: 3px; padding-bottom: 3px; padding-right: 6px; transition: background var(--t-fast); }
.pms-now li[data-open][role=button] { padding-left: 24px; }
.pms-now li[data-open][role=button] .dot { left: 6px; }
.pms-now li[data-open][role=button]:hover, .pms-now li[data-open][role=button]:focus-visible { background: var(--surface-2); outline: none; }
@media (max-width: 760px) {
    .pms-settings .pms-settings-grid, .pms-settings .set-hub { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .set-chip { max-width: 34%; }
}

/* ===== Shaxmatka qulayliklari: ixcham, toifani yig'ish, tezkor menyu ===== */
.icon-btn.icon-btn-sm { width: 32px; height: 32px; border-radius: 8px; }
.icon-btn.icon-btn-sm svg { width: 17px; height: 17px; }
.icon-btn.on { border-color: var(--primary); color: #fff; background: var(--primary); }
.pms-keys { cursor: help; }
.pms-board.dense { font-size: 12px; --pms-day-w: 28px; }   /* qator balandligi — --pms-row-h (qat'iy, yuqorida) */
.pms-board.dense .pms-bar { margin: 3px 2px; font-size: 11.5px; padding: 0 6px; }
.pms-board.dense .pms-unit, .pms-board.dense .pms-group { padding: 2px 8px; }
.pms-board.dense .pms-day { padding: 2px 1px; }
.pms-board.dense .pms-day small { font-size: 10px; }
.pms-group[role="button"] { cursor: pointer; user-select: none; align-items: center; }
.pms-group-chev { width: 8px; height: 8px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--t-fast); }
.pms-group.shut .pms-group-chev { transform: rotate(-45deg); }
.pms-group.shut { color: var(--muted); }
.pms-group:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.pms-ctx { position: fixed; z-index: 90; min-width: 220px; max-width: 300px; padding: 6px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg, 0 10px 30px rgba(0, 0, 0, .18)); display: grid; gap: 2px; }
.pms-ctx[hidden] { display: none; }
.pms-ctx-head { font-size: 12px; color: var(--muted); padding: 4px 10px 6px; border-bottom: 1px solid var(--border); margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pms-ctx > button { all: unset; box-sizing: border-box; width: 100%; text-align: left; border: 0; background: transparent; box-shadow: none; cursor: pointer;
    padding: 8px 10px; border-radius: 7px; font: inherit; font-size: 14px; font-weight: 500; color: var(--text); }
.pms-ctx > button:hover, .pms-ctx > button:focus-visible { background: var(--primary-soft); color: var(--primary); }
.pms-free-none { margin: 10px 2px 0; font-size: 14px; }
.hk-inspect-all { display: inline; margin: 0; }
.cat-beds { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; border: 0; padding: 0; margin: 0; }
.cat-beds legend { font-weight: 600; margin-bottom: 6px; }
.cat-beds label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-weight: 600; margin-bottom: 6px; }
.hk-check-all { margin-top: 6px; }
#rpModal .inline-fields input { flex: 1 1 120px; } #rpModal .inline-fields select { flex: 0 0 150px; width: 150px; }
/* Yonma-yon maydonlar: tanlov o'z kengligida, son maydoni — qolgan joyda (kamida 100px; nol kenglikka siqilmasin). */
.inline-fields > select { flex: 0 1 auto; width: auto; max-width: 62%; }
.inline-fields > input { flex: 1 1 120px; min-width: 100px; }

/* Jurnal: filtr — maydonlar qatorlarga o'zi tushadi (quti ichida), tugmalar alohida qatorda o'ngda; yozuvlar — modal oynada */
.pms-journal-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 14px; align-items: end; }
.pms-journal-filter .j-action { grid-column: span 2; }
.pms-journal-filter .field { min-width: 0; }
.pms-journal-filter select, .pms-journal-filter input { width: 100%; min-width: 0; }
.pms-journal-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.modal.modal-journal { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 48px); }
.modal-journal > .modal-head { padding: 20px 22px 0; position: sticky; top: 0; background: var(--surface); z-index: 1; padding-bottom: 12px; }
.modal-journal .journal-body { padding: 4px 22px 22px; }
@media (max-width: 560px) {
    .pms-journal-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pms-journal-actions .btn { flex: 1; }
}

/* ---------- Мавзу тугмаси (кундузги ↔ тунги): қуёш/ой айланиб алмашади ---------- */
.theme-toggle {
    position: relative; width: 40px; height: 40px; flex: none; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    display: inline-grid; place-items: center; overflow: hidden;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.theme-toggle:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .theme-ico { grid-area: 1 / 1; display: grid; place-items: center; transition: transform .45s var(--ease), opacity .3s var(--ease); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .theme-sun { color: #f59e0b; }
.theme-toggle .theme-moon { color: #a5b4fc; transform: translateY(26px) rotate(-90deg); opacity: 0; }
:root[data-theme="dark"] .theme-toggle .theme-sun { transform: translateY(-26px) rotate(90deg); opacity: 0; }
:root[data-theme="dark"] .theme-toggle .theme-moon { transform: none; opacity: 1; }
:root[data-theme-pref="auto"] .theme-toggle::after {
    content: "A"; position: absolute; right: 3px; bottom: 2px; font-size: 9px; font-weight: 800; color: var(--muted); line-height: 1;
}
/* Мавзу алмашганда — силлиқ ўтиш (фақат ранглар). */
:root.theme-anim, :root.theme-anim * { transition: background-color .3s ease, color .3s ease, border-color .3s ease !important; }
/* Тугма изоҳи тунги режимда — ёруғ фонда (қоронғи фонда кўринмай қолмасин). */
:root[data-theme="dark"] .icon-btn[aria-label]::after { background: #e6ecf6; color: #0f172a; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
/* Бронь ҳисоби (фолио): жадвал қутидан чиқмайди — ёнга сурилади; «Номи» устуни қаторга ўралади, рақамлар бир қаторда. */
.pms-folio-wrap { padding: 0; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
.pms-folio-wrap .pms-folio { min-width: 640px; }
.pms-folio-wrap .pms-folio td:nth-child(3) { white-space: normal; min-width: 160px; }
.pms-folio th, .pms-folio td { padding: 11px 10px; }
.pms-search-room { width: 96px; min-width: 0; }
/* Belgili tugma izohi endi umumiy .tip-pop oynasida (app.js) — bir vaqtda bitta, ekran chetidan chiqmaydi; CSS izohi o'chirildi. */
.icon-btn[aria-label]::after { display: none !important; }
/* Давлат танлаш: байроқ + ном, қидирув рўйхати */
.country-box { position: relative; }
.country-box .country-flag { position: absolute; left: 12px; top: 50%; width: 22px; height: 16px; margin-top: -8px; border-radius: 3px; object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .12); pointer-events: none; }
.country-box.has-flag input { padding-left: 44px; }
.country-menu { position: absolute; z-index: 1200; left: 0; right: 0; top: calc(100% + 6px); max-height: 280px; overflow-y: auto; margin: 0; padding: 6px;
    list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
.country-menu li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.country-menu li img { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(15, 23, 42, .12); }
.country-menu li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-menu li small { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.country-menu li.on, .country-menu li:hover { background: var(--primary-soft); }
.country-menu li.empty { color: var(--muted); cursor: default; justify-content: center; }
/* Шахматка: бронни сичқонча билан бошқа хонага суриш */
#board a.pms-bar[data-status="PENDING"], #board a.pms-bar[data-status="CONFIRMED"], #board a.pms-bar[data-status="CHECKED_IN"] { cursor: grab; }
.pms-drag-on, .pms-drag-on * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.pms-drag-ghost { position: fixed !important; z-index: 2000; pointer-events: none; opacity: .92; transform: rotate(-1.5deg) scale(1.03);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .35); display: flex; align-items: center; }
.pms-bar.pms-dragging { opacity: .35; }
#board .pms-drop-row { background-color: var(--primary-soft) !important; }
#board .pms-unit.pms-drop-row { box-shadow: inset 4px 0 0 var(--primary); }
#board .pms-drop-bad { background-color: var(--danger-soft) !important; }
#board .pms-unit.pms-drop-bad { box-shadow: inset 4px 0 0 var(--danger); }
/* Шахматка: хонадан хонага кўчган меҳмон — бронь бўлаклари узуқ стрелка билан боғланади */
.pms-move-links { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 1; overflow: visible; color: var(--primary); filter: drop-shadow(0 0 1.5px var(--surface)) drop-shadow(0 0 1.5px var(--surface)); }
.pms-move-links path.lnk { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 5 4; stroke-linecap: round; opacity: .9; }
#board .pms-bar.pms-moved-from { border-right: 2px dashed currentColor; }
#board .pms-bar.pms-moved-to { border-left: 2px dashed currentColor; }
#board .pms-bar .pms-move-tag { flex: none; margin: 0 4px; padding: 0 5px; border-radius: 5px; font-size: 10.5px; font-weight: 800; line-height: 16px;
    background: rgba(255, 255, 255, .85); color: #1e3a8a; white-space: nowrap; }
/* Шахматка: бўш катакни белгилагандан кейин — амал танлаш (янги брон, walk-in, day use, блок) */
.pms-pick { min-width: 270px; max-width: 320px; }
.pms-pick-item { display: flex !important; align-items: flex-start; gap: 10px; text-align: left; white-space: normal; padding: 9px 10px !important; }
.pms-pick-item .pi-ico { font-size: 18px; line-height: 1.2; width: 22px; flex: none; text-align: center; }
.pms-pick-item .pi-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pms-pick-item .pi-txt small { color: var(--muted); font-weight: 500; font-size: 12px; line-height: 1.35; }
/* Sarlavhasi forma ichida emas (to'g'ridan-to'g'ri oynada) bo'lgan oynalar — masalan, Интеграциялар → «бошқа амаллар», «ЭСФ — созламалар»,
   агентлар, жадваллар: ichki bo'shliq, sarlavha va pastki tugmalar forma oynalari bilan bir xil. */
.modal:has(> .modal-head):not(:has([data-detail-body])) > .modal-head {
    position: sticky; top: 0; z-index: 2; padding: 18px 22px 14px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.modal:has(> .modal-head):not(:has([data-detail-body])) > .modal-head h3 { font-size: 18px; font-weight: 700; color: var(--primary); margin: 0; }
.modal:has(> .modal-head):not(:has([data-detail-body])) > :not(.modal-head):not(.form-actions):not(.form):not(script):not(style) { margin: 16px 22px 0; }
.modal:has(> .modal-head):not(:has([data-detail-body])) > .form > :first-child { margin-top: 16px; }
.modal:has(> .modal-head):not(:has([data-detail-body])) > .form > .form-actions {
    position: static; margin: 12px 22px 0; padding: 0; background: none; border: 0; justify-content: flex-start;
}
.modal:has(> .modal-head):not(:has([data-detail-body])) > .hint { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.modal:has(> .modal-head):not(:has([data-detail-body])) > .hint + form { margin-top: 10px; }
.modal:has(> .modal-head):not(:has([data-detail-body])) > form + .hint { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); }
.modal:has(> .modal-head):not(:has([data-detail-body])) > .form-actions {
    position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; margin: 20px 0 0; padding: 14px 22px;
    background: var(--surface-2); border-top: 1px solid var(--border);
}
/* Смена изоҳи (тозалаш экрани): кенг майдон, бошқа майдонлар каби; тугма ёнида, телефонда — алоҳида қаторда */
.pms-note-row { align-items: center; }
.pms-note-row > .pms-note-input { flex: 1 1 320px; min-width: 0; font: inherit; padding: 11px 14px; border: 1px solid var(--border); border-radius: 11px;
    background: var(--surface-2); color: var(--text); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.pms-note-row > .pms-note-input:hover { border-color: var(--border-strong); }
.pms-note-row > .pms-note-input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }
@media (max-width: 600px) { .pms-note-row > .pms-note-input { flex-basis: 100%; } .pms-note-row > .btn { flex: 1; } }
/* PMS sahifalari (ресепшн, шахматка, тозалаш…): банерлар остида ортиқча бўшлиқ йўқ — жадвал юқорироқда */
.container.pms-page { padding-top: 12px; }
.container.pms-page > .page-head { margin-top: 0; }
@media (max-width: 600px) { .container.pms-page { padding-top: 10px; } }
/* Шахматка: тартиб танлаш ва тоифани суриб тартиблаш */
.pms-search-sort { width: auto; min-width: 0; max-width: 150px; text-overflow: ellipsis; }
#board .pms-group[data-cat] { cursor: grab; }
#board .pms-group.pms-cat-dragging { opacity: .5; }
#board .pms-group.pms-cat-drop-before { box-shadow: inset 0 3px 0 var(--primary); }
#board .pms-group.pms-cat-drop-after { box-shadow: inset 0 -3px 0 var(--primary); }
input.pms-search.pms-search-room { width: 96px; }
input.pms-search { width: 180px; }
@media (max-width: 720px) { input.pms-search.pms-search-room, input.pms-search { width: 100%; } .pms-search-sort { max-width: none; width: 100%; } }
/* Шахматка: бронь чизиғи кириш ва чиқиш вақтига қараб (1С каби) — масалан 14:00 да бошланиб, кетиш куни 12:00 да тугайди;
   кетаётган ва келаётган меҳмон бир катакда ёнма-ён. --fs / --fe — кун улуши, --sp — эгаллаган устунлар. */
#board .pms-bar.timed { margin-left: calc(var(--fs, 0) * 100% / var(--sp, 1) + 1px); margin-right: calc((1 - var(--fe, 1)) * 100% / var(--sp, 1) + 1px);
    min-width: 8px; overflow: hidden; white-space: nowrap; }
/* Шахматка: бронлар орасидаги бўш вақт (тозалаш билан) — меҳмон кетадиган / келадиган катак устига сичқонча олиб борилганда */
#board .pms-gap-hint { z-index: 3; pointer-events: none; margin: 3px 0; border-radius: 6px; border: 1.5px dashed #16a34a;
    background: color-mix(in srgb, #16a34a 16%, transparent); margin-left: calc(var(--gs, 0) * 100%); margin-right: calc((1 - var(--ge, 1)) * 100%); min-width: 4px; }
#board .pms-gap-hint.none { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); margin-left: 0; margin-right: 0; }
.pms-gap-tip { position: fixed; z-index: 60; pointer-events: none; padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 4px 14px rgba(0, 0, 0, .14); white-space: nowrap; }
/* PMS созламалари → Соатлик бронь */
.pms-hourly-rules, .pms-hourly-add { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; margin-top: 12px; }
.pms-hourly-rules .field, .pms-hourly-add .field { margin: 0; min-width: 130px; flex: 1 1 140px; }
.pms-hourly-add .field:first-child { flex: 2 1 200px; }
.pms-hourly-table { margin-top: 14px; }
.pms-hourly-rules .pms-hourly-on { flex: 1 1 100%; display: flex; gap: 8px; align-items: flex-start; }
/* Forma qoralamasi: «Сақланмай қолган маълумот бор — Тиклаш» */
.draft-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.draft-bar .draft-actions { display: flex; gap: 8px; }

/* Yagona mehmonxona (mehmonxona tomonidagi xodim) — tepada nomi, tanlash yo'q; bosilsa dashboard. */
.ws-switch.ws-single { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 7px 12px;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
    font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.ws-switch.ws-single:hover { border-color: var(--primary); }
@media (max-width: 600px) { .ws-switch.ws-single { padding: 6px 9px; } }

/* Guruh yaratish: bir nechta xona qatori (tur, soni, sanalar, kishi, narx). */
#groupModal.modal-wide { width: min(1040px, calc(100vw - 24px)); }
.grp-sub { margin: 14px 0 6px; font-size: 15px; }
.grp-lines td, .grp-lines th { padding: 6px 6px; vertical-align: middle; }
.grp-lines select { min-width: 150px; max-width: 220px; }
.grp-lines input[type=date] { min-width: 132px; }
.grp-lines .num-in { width: 64px; text-align: right; }
.grp-lines input[name=rate] { width: 110px; }
.grp-lines-foot { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; flex-wrap: wrap; }
.grp-block-fill { display: inline-flex; gap: 6px; align-items: center; }
.grp-block-fill input { width: 70px; }
.grp-guests td { padding: 4px 6px; vertical-align: top; }
.grp-guests input { width: 100%; min-width: 120px; }
.grp-guests .grp-room { min-width: 110px; background: var(--surface-2, transparent); }
.grp-guests tbody { border-top: 2px solid var(--border); }
.grp-guests .grp-main { font-weight: 600; }
.grp-guests .grp-new input::placeholder { font-style: italic; }
.grp-block-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.grp-block-actions form { margin: 0; }

/* Hujjatlar (hisob varag'i, guruh hisobi, mehmon hisoblari): jadval karta ichida qoladi — nomlar qatorga o'raladi, raqamlar bir qatorda. */
.pms-doc .pms-folio { width: 100%; max-width: 100%; }
.pms-doc .pms-folio th, .pms-doc .pms-folio td { padding: 9px 8px; }
.pms-doc .pms-folio td { white-space: normal; overflow-wrap: anywhere; }
.pms-doc .pms-folio td.num, .pms-doc .pms-folio th.num { white-space: nowrap; overflow-wrap: normal; }

/* Shaxmatka: «турига қарамай» tartibida tur sarlavhalari yo'q — xona yonida turi kichik yozuvda. */
.pms-unit .pms-unit-cat { display: none; }
.pms-flat .pms-unit .pms-unit-cat { display: block; flex: 1 1 auto; min-width: 0; font-size: 11px; color: var(--muted); font-weight: 500; line-height: 1.1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ===== Xizmatlar katalogi: papkalar (Windows kabi) — sozlamalar sahifasi va bron kartasidagi tanlash oynasi ===== */
.svc-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 4px 0 12px; }
.svc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.svc-crumbs a, .svc-crumbs button { border: 0; background: none; padding: 4px 6px; border-radius: 8px; color: var(--primary); font: inherit; font-weight: 600;
    cursor: pointer; text-decoration: none; }
.svc-crumbs a:hover, .svc-crumbs button:hover { background: var(--surface-2); }
.svc-crumbs span { color: var(--muted); }
.svc-search input { min-width: 240px; }
.svc-current { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.svc-current form { margin: 0; }
.svc-current-ico { font-size: 22px; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.svc-folder, .svc-item { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; min-height: 92px;
    padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit;
    cursor: pointer; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .05s; }
.svc-folder:hover, .svc-item:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(30, 58, 138, .12); }
.svc-folder:active, .svc-item:active { transform: scale(.98); }
.svc-folder-ico { font-size: 28px; line-height: 1; }
.svc-folder-name, .svc-item-name { font-weight: 700; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.svc-item { background: var(--surface-2, var(--surface)); }
.svc-item small { font-size: 11.5px; }
.svc-item-price { margin-top: auto; font-weight: 700; color: var(--primary); font-size: 13.5px; }
.svc-item-price small { color: var(--muted); font-weight: 500; }
.svc-item.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.svc-item-badge { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary);
    color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.svc-move { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 6px 4px; }
.svc-move select { max-width: 360px; }
.svc-row-actions { white-space: nowrap; }
.svc-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-icon-opt { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 20px; }
.svc-icon-opt input { position: absolute; opacity: 0; pointer-events: none; }
.svc-icon-opt:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--surface-2); }

/* Tanlash oynasi */
.modal.svc-picker { width: min(980px, calc(100vw - 24px)); }
.svc-pick-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.svc-pick-search { flex: 1 1 220px; max-width: 340px; }
.svc-pick-body { max-height: min(46vh, 420px); overflow-y: auto; padding: 2px 2px 4px; }
.svc-sub { margin: 4px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.svc-free { margin: 6px 0 10px; }
.svc-free summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 13.5px; }
.svc-free-row { display: grid; grid-template-columns: minmax(160px, 1fr) 80px 120px auto; gap: 8px; margin-top: 8px; }
.svc-cart { border-top: 1px solid var(--border); padding-top: 10px; }
.svc-cart-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.svc-cart-table td, .svc-cart-table th { padding: 6px 6px; vertical-align: middle; }
.svc-cart-table input[type=number] { width: 72px; text-align: right; }
.svc-cart-table .svc-price-in { width: 110px; }
.svc-cart-table select { max-width: 180px; }
.svc-qty { display: inline-flex; align-items: center; gap: 4px; }
.svc-qty button { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; font-weight: 700; }
@media (max-width: 600px) {
    .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .svc-free-row { grid-template-columns: 1fr 1fr; }
    .svc-search input { min-width: 0; width: 100%; }
}

/* Shaxmatka: «Жами бўш» va (i) — bitta qatorda. */
.pms-corner.pms-corner-free { flex-direction: row; align-items: center; justify-content: flex-start; gap: 4px; white-space: nowrap; }
.pms-corner-free .pms-free-short { display: none; }
@media (max-width: 560px) { .pms-corner-free .pms-free-full { display: none; } .pms-corner-free .pms-free-short { display: inline; } .pms-corner.pms-corner-free { padding: 6px 8px; } }
.grp-foc { white-space: nowrap; }
.grp-foc .badge { margin-right: 4px; }

/* Bron kartasi: shikoyat formasi — keng maydonlar (mavzu + matn + tugma), tor ekranda ustma-ust. */
.pms-complaint-form { display: grid; grid-template-columns: minmax(180px, 240px) 1fr auto; gap: 10px; align-items: end; margin-top: 10px; max-width: 980px; }
.pms-complaint-form .field { margin: 0; }
.pms-complaint-form .pms-cf-text textarea { min-height: 44px; resize: vertical; }
.pms-complaint .pms-complaint-form { grid-template-columns: 1fr auto; margin-top: 6px; }
@media (max-width: 700px) { .pms-complaint-form, .pms-complaint .pms-complaint-form { grid-template-columns: 1fr; } }

/* Xizmat oynasi v2: chapda katalog, o'ngda doim ko'rinadigan saватча (batafsil). */
.modal.svc-picker { width: min(1120px, calc(100vw - 24px)); }
.svc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.svc-shop { min-width: 0; }
.svc-shop .svc-pick-search { margin: 0 0 8px; max-width: none; }
.svc-shop .svc-crumbs { margin-bottom: 8px; }
.svc-shop .svc-pick-body { max-height: min(58vh, 520px); }
.svc-item { padding-right: 34px; }
.svc-item-plus { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--border);
    display: grid; place-items: center; color: var(--primary); font-weight: 800; font-size: 15px; }
.svc-item:hover .svc-item-plus { background: var(--primary); color: #fff; border-color: var(--primary); }
.svc-basket { position: sticky; top: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2, var(--surface));
    padding: 12px; display: flex; flex-direction: column; gap: 10px; max-height: min(66vh, 600px); }
.svc-basket-head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.svc-basket-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--primary); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.svc-basket-empty { margin: 4px 0; color: var(--muted); font-size: 13.5px; }
.svc-basket-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.svc-line { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 8px 10px; display: grid; gap: 6px; }
.svc-line.flash { animation: svcFlash .8s ease; }
@keyframes svcFlash { from { box-shadow: 0 0 0 3px var(--primary); } to { box-shadow: none; } }
.svc-line-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.svc-line-name { font-size: 13.5px; line-height: 1.25; overflow-wrap: anywhere; }
.svc-line-del { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.svc-line-del:hover { color: var(--danger, #dc2626); }
.svc-line-row { display: flex; align-items: center; gap: 6px; }
.svc-line-row .svc-qty input { width: 46px; text-align: center; padding: 4px; }
.svc-line-x { color: var(--muted); }
.svc-line-price { width: 92px; text-align: right; padding: 4px 6px; }
.svc-line-sum { margin-left: auto; white-space: nowrap; font-size: 13.5px; }
.svc-line input, .svc-line select { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.svc-line-who select { width: 100%; padding: 4px 6px; }
.svc-free-toggle { align-self: flex-start; border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; padding: 0; }
.svc-basket .svc-free-row { grid-template-columns: 1fr 100px auto; margin: 0; }
.svc-basket .svc-free-row .field { margin: 0; }
.svc-basket-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); padding-top: 8px; font-size: 15px; }
.svc-basket-total b { font-size: 18px; color: var(--primary); }
@media (max-width: 860px) {
    .svc-layout { grid-template-columns: 1fr; }
    .svc-basket { position: static; max-height: none; }
    .svc-shop .svc-pick-body { max-height: 42vh; }
}

/* =========================================================
   Bron kartasi v2 (11.11): minimal — sarlavha, bitta amallar qatori, pul qatori va 6 ta katta qator.
   Tafsilot (mehmonlar, hisob, to'lovlar, shikoyatlar, tafsilot, tarix) — oynalarda (dialog.bk-sheet).
   ========================================================= */
.bk-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

.bk-hero { position: relative; margin: 0 0 14px; padding: 16px 20px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 60%), var(--surface);
    box-shadow: var(--shadow-sm); overflow: hidden; }
.bk-hero .back-link { display: inline-block; margin-bottom: 8px; }
.bk-hero-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.bk-avatar { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; font-size: 22px; font-weight: 800;
    color: #fff; background: var(--primary-grad, var(--primary)); box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 35%, transparent); }
.bk-hero-text { min-width: 0; display: grid; gap: 6px; }
.bk-hero h1 { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.2; }
.bk-no { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--muted); order: 2; }
.bk-guest { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
a.bk-guest:hover { color: var(--primary); }
.bk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-chip, .bk-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.bk-status { color: var(--text); }
.bk-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.bk-st-pending { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.bk-st-confirmed { color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.bk-st-checked_in { color: var(--success); background: var(--success-soft); border-color: transparent; }
.bk-st-checked_in::before { animation: bkPulse 2s ease-in-out infinite; }
.bk-st-checked_out { color: var(--muted); }
.bk-st-cancelled, .bk-st-no_show { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
@keyframes bkPulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 0%, transparent); } }
.bk-chip-ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
.bk-chip-warn { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.bk-chip-bad { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.bk-chip-vip { color: #8a5a00; background: linear-gradient(135deg, #ffe9a8, #ffd36b); border-color: transparent; }
.bk-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.bk-fact { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); text-decoration: none; min-width: 0; }
.bk-fact .ic { color: var(--primary); opacity: .85; }
.bk-fact b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
a.bk-fact:hover { color: var(--primary); }
.bk-fact-time { font-size: 12.5px; }

.bk-actions { gap: 8px; padding: 10px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.bk-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.bk-actions .bk-main { min-width: 150px; font-weight: 700; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 28%, transparent); }
.bk-actions .action-menu { max-height: min(70vh, 520px); overflow: auto; min-width: 260px; }
.action-menu .menu-label { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.action-menu .menu-label:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; }

.bk-money { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 14px; padding: 14px 0 18px;
    border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.bk-money > div:not(.bk-progress) { display: grid; gap: 2px; padding: 0 18px; border-right: 1px solid var(--border); min-width: 0; }
.bk-money > div.bk-bal { border-right: 0; }
.bk-money small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.bk-money b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-money .muted { font-size: 12.5px; }
.bk-money.due { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.bk-money.due .bk-bal b { color: var(--danger); }
.bk-money.over .bk-bal b { color: var(--warning); }
.bk-money.clear .bk-bal b { color: var(--success); }
.bk-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--surface-2); }
.bk-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--success), color-mix(in srgb, var(--success) 60%, var(--primary)));
    border-radius: 0 4px 4px 0; transition: width .6s var(--ease); }

.bk-hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.bk-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 14px 12px 12px; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm);
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), border-color var(--t-fast); }
.bk-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.bk-row:active { transform: translateY(0) scale(.99); }
.bk-row:focus-visible { outline: none; box-shadow: var(--ring, 0 0 0 3px var(--primary-soft)); border-color: var(--primary); }
.bk-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; }
.bk-ic .ic { width: 22px; height: 22px; }
.bk-ic-blue { color: #2563eb; background: color-mix(in srgb, #2563eb 12%, transparent); }
.bk-ic-violet { color: #7c3aed; background: color-mix(in srgb, #7c3aed 12%, transparent); }
.bk-ic-green { color: #059669; background: color-mix(in srgb, #059669 12%, transparent); }
.bk-ic-amber { color: #d97706; background: color-mix(in srgb, #d97706 13%, transparent); }
.bk-ic-red { color: var(--danger); background: var(--danger-soft); }
.bk-ic-sky { color: #0284c7; background: color-mix(in srgb, #0284c7 12%, transparent); }
.bk-ic-gray { color: var(--muted); background: var(--surface-2); }
.bk-row-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bk-row-text b { font-size: 15.5px; font-weight: 700; color: var(--text); }
.bk-row-text small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-row-text small.warn { color: var(--warning); font-weight: 600; }
.bk-row-text small.bad { color: var(--danger); font-weight: 600; }
.bk-count { flex: none; min-width: 28px; padding: 3px 9px; border-radius: 999px; text-align: center; font-size: 13px; font-weight: 700;
    background: var(--surface-2); color: var(--text); font-variant-numeric: tabular-nums; }
.bk-count.bad { background: var(--danger); color: #fff; }
.bk-chev { color: var(--muted); transition: transform var(--t-fast) var(--ease); }
.bk-row:hover .bk-chev { transform: translateX(3px); color: var(--primary); }

/* Bo'lim oynasi (sheet) */
.modal.bk-sheet { width: min(860px, calc(100vw - 24px)); }
.modal.bk-sheet.bk-sheet-xl { width: min(1080px, calc(100vw - 24px)); }
.bk-sheet-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 14px 18px;
    background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); }
.bk-sheet-head h3 { margin: 0; flex: 1; font-size: 18px; font-weight: 800; }
.bk-sheet-head .bk-ic { width: 38px; height: 38px; border-radius: 11px; }
.bk-sheet-head .bk-ic .ic { width: 20px; height: 20px; }
.bk-sheet-body { padding: 16px 18px 22px; display: grid; gap: 14px; }
.bk-sheet-body > .pms-dl { margin: 0; }
.bk-sheet-body .table-wrap, .bk-sheet-body > table { overflow-x: auto; }
@media (max-width: 760px) {
    .bk-hub { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .bk-row { min-height: 64px; }
    .bk-money b { font-size: 16px; }
    .bk-money > div:not(.bk-progress) { padding: 0 10px; }
    .bk-hero { padding: 14px 14px 12px; }
    .bk-avatar { width: 44px; height: 44px; font-size: 19px; border-radius: 13px; }
    .bk-facts { gap: 8px 14px; }
    .bk-actions .bk-main { flex: 1 1 100%; }
    /* Telefonda bo'lim oynasi — pastdan chiquvchi to'liq varaq */
    .modal.bk-sheet, .modal.bk-sheet.bk-sheet-xl { width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: calc(var(--vh, 1vh) * 100 - 24px);
        border-radius: 20px 20px 0 0; border-bottom: 0; }
    .modal.bk-sheet[open] { animation: bkSheetUp .18s var(--ease); }
}
@keyframes bkSheetUp { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bk-row, .bk-chev, .bk-progress i { transition: none; } .bk-st-checked_in::before { animation: none; } }
.action-menu form { display: contents; }
.bk-g-act { white-space: nowrap; text-align: right; }
.bk-rowmenu { display: inline-block; margin-left: 4px; vertical-align: middle; }
.bk-rowmenu > summary.btn { padding-inline: 8px; }
.bk-sheet .debt-table td { vertical-align: middle; }
.bk-g-act .action-menu { text-align: left; }
.bk-rowmenu[open] > .action-menu { position: fixed; right: auto; z-index: 50; overflow: auto; overscroll-behavior: contain; }
/* Тўловлар: сторно қилинган тўлов ва сторно қатори — хира, сумма чизилган; тарихда қолади */
.pay-void > td { color: var(--muted); }
.pay-void .pay-amount { text-decoration: line-through; }
.pay-void-note { display: block; font-size: 12px; }
/* Bekor qilish oynasi: jarima va qaytariladigan summa — bosishdan oldin */
.cancel-preview { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 12px; margin: 0 0 12px;
    border-radius: 10px; background: var(--danger-soft); color: var(--text, inherit); }
.cancel-preview b { white-space: nowrap; }
.bk-sheet .hint.warn { color: var(--warning); }
.action-menu .menu-item.muted { white-space: normal; max-width: 260px; cursor: default; }
@media (max-width: 760px) {
    .bk-money { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
    .bk-money > div:nth-child(2) { border-right: 0; }
    .bk-money > div.bk-bal { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--border); grid-template-columns: 1fr auto; align-items: center; }
    .bk-money > div.bk-bal b { font-size: 20px; }
    .bk-money b { font-size: 17px; }
}
@media (max-width: 760px) {
    .bk-actions > .btn, .bk-actions > .action-more { flex: 1 1 0; min-width: 0; }
    .bk-actions > .action-more > summary { width: 100%; box-sizing: border-box; }
    .bk-actions .btn { padding-inline: 10px; }
}
/* Shaxmatka: bo'sh soni — guruh bloki yoki kvota ushlab turgan xonalar bor (chiziq bo'lib ko'rinmaydi) — kichik binafsha nuqta. */
.pms-free.held, .pms-group-free.held { position: relative; cursor: help; }
.pms-free.held::after, .pms-group-free.held::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--violet, #7c3aed); }

/* =========================================================
   Sayt sahifasi v2 (11.11): sarlavha, ishga tushirish chizig'i, ko'rsatkichlar va 8 ta bo'lim — tafsilot oynalarda.
   ========================================================= */
.st-sub { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; }
.st-logo { overflow: hidden; background: var(--surface-2); color: var(--primary); box-shadow: none; border: 1px solid var(--border); }
.st-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; box-sizing: border-box; }
.st-logo .ic { width: 26px; height: 26px; }
.st-url { text-decoration: none; color: var(--primary); }
.st-url .ic { width: 14px; height: 14px; }
.st-url:hover { border-color: var(--primary); }

.st-quick { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 14px; padding: 22px;
    background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--violet, #7c3aed) 12%, transparent), transparent 60%), var(--surface); }
.st-quick h3 { margin: 0 0 6px; font-size: 19px; }
.st-quick p { margin: 0 0 14px; color: var(--muted); max-width: 640px; }
.st-quick form { display: flex; flex-wrap: wrap; gap: 8px; }
.st-quick .btn { display: inline-flex; align-items: center; gap: 7px; }

.st-launch { margin-bottom: 14px; padding: 14px 18px; display: grid; gap: 10px; }
.st-launch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.st-launch-head b { font-size: 15px; }
.st-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet, #7c3aed), var(--primary)); transition: width .6s var(--ease); }
.st-todo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.st-todo button.bk-chip { cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
.st-todo button.bk-chip:hover { filter: brightness(.95); text-decoration: underline; }

.bk-money.st-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 14px; }
.st-kpi > div:nth-child(3) { border-right: 1px solid var(--border); }

/* Oyna: pastki doimiy «Сақлаш» qatori */
.st-form { display: contents; }
.bk-sheet-foot { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px;
    background: color-mix(in srgb, var(--surface-2) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); }
.st-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.st-publish { padding: 12px 14px; border-radius: var(--radius); background: var(--success-soft); }

/* Tillar: UZ / RU / EN tugmalari */
.st-lang { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.st-lang textarea, .st-lang input { width: 100%; box-sizing: border-box; }
.st-lang-bar { display: flex; align-items: center; gap: 4px; }
.st-lang-label { flex: 1; font-size: 13px; font-weight: 600; color: var(--muted); }
.st-lang-bar button { all: unset; position: relative; cursor: pointer; padding: 4px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.st-lang-bar button:hover { color: var(--text); background: var(--surface); }
.st-lang-bar button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.st-lang-bar button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.st-lang-bar button.miss::after { content: ""; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }

/* Qulayliklar — ikonali kartochkalar */
.st-amens { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.st-amen { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 10px; cursor: pointer; font-size: 13.5px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: border-color var(--t-fast), background var(--t-fast); }
.st-amen input { position: absolute; opacity: 0; pointer-events: none; }
.st-amen .ic { color: var(--muted); }
.st-amen:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.st-amen:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.st-amen:has(input:checked) .ic { color: var(--primary); }
.st-amen:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Ro'yxatlar (xizmatlar, so'rovlar, fikrlar, takliflar) */
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.st-list > li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.st-list > li.st-new { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); background: color-mix(in srgb, var(--warning) 6%, var(--surface)); }
/* Sayt matnlari (17.11): guruhlar yig'iladi, sahifa uzaymaydi. */
.st-text-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-top: 10px; }
.st-text-group > summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; }
.st-text-group > summary::-webkit-details-marker { display: none; }
.st-text-group > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
.st-text-group[open] > summary::after { transform: rotate(180deg); }
.st-text-group > .st-list { padding: 0 10px 10px; }
.st-text-group .bk-row-text { min-width: 0; flex: 1; }
.st-text-group .bk-row-text b, .st-text-group .bk-row-text small { overflow-wrap: anywhere; }
.st-list .bk-ic { width: 38px; height: 38px; border-radius: 11px; }
.st-list .bk-ic .ic { width: 20px; height: 20px; }
.st-list form { display: inline-flex; gap: 6px; margin: 0; }
.st-list .btn { display: inline-flex; align-items: center; gap: 5px; }
.st-list small.warn, .site-img small.warn { color: var(--warning); font-weight: 600; }
.st-wrap { white-space: normal !important; overflow: visible !important; }
.st-del:hover { color: var(--danger); border-color: var(--danger); }
.st-stars { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 6px 9px; border-radius: 10px; background: color-mix(in srgb, #f59e0b 14%, transparent); color: #b45309; }
.st-stars .ic { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.st-badge { flex: none; min-width: 38px; padding: 6px 8px; border-radius: 10px; text-align: center; font-weight: 800; font-size: 13px;
    color: #fff; background: linear-gradient(135deg, var(--danger), #f97316); }
.st-row-acts { flex-wrap: wrap; justify-content: flex-end; }

.st-room > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-room > summary b { margin-right: auto; }
.st-room-form { display: grid; gap: 12px; padding: 12px 2px 4px; }
.st-upload { display: grid; gap: 10px; padding: 12px; border: 1px dashed color-mix(in srgb, var(--primary) 35%, var(--border)); border-radius: var(--radius); background: var(--surface-2); }
.st-upload .btn, .st-quick .btn { gap: 7px; }

@media (max-width: 760px) {
    .bk-money.st-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-kpi > div:nth-child(2) { border-right: 0; }
    .st-kpi > div.bk-bal { grid-column: auto; padding-top: 0; border-top: 0; display: grid; grid-template-columns: none; }
    .st-kpi > div:nth-child(n+3) { padding-top: 10px; border-top: 1px solid var(--border); }
    .st-grid3, .st-grid4 { grid-template-columns: minmax(0, 1fr); }
    .st-quick { flex-direction: column; padding: 16px; }
    .st-list > li { flex-wrap: wrap; }
    .st-list .bk-row-text { flex-basis: calc(100% - 60px); }
    .bk-sheet-foot .btn { flex: 1; }
}
.st-lang input:not([type=checkbox]):not([type=radio]), .st-lang textarea, .st-lang select { background: var(--surface); }
.st-lang [data-lang-pane] > textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
@media (max-width: 760px) {
    .st-page .bk-actions > .btn { flex: 1 1 auto; white-space: nowrap; }
    .st-page .bk-actions > .bk-main { flex: 1 1 100%; }
}

/* Sayt → Xona turlari: CRUD qatori, rasmlar shu yerda */
.st-room > summary { flex-wrap: wrap; }
.st-room-name { display: grid; gap: 1px; margin-right: auto; min-width: 0; }
.st-room-name small { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.st-room-acts { display: inline-flex; gap: 6px; }
.st-room-acts .btn { display: inline-flex; align-items: center; gap: 5px; }
.st-room.st-off > summary .st-room-name b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.st-room.st-isdup { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.st-room-photos { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 2px 0; }
.st-thumb { position: relative; margin: 0; width: 92px; height: 68px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.st-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-thumb form { position: absolute; top: 3px; right: 3px; margin: 0; }
.st-thumb-del { all: unset; cursor: pointer; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(15, 23, 42, .65); color: #fff; font-size: 15px; line-height: 1; opacity: .85; }
.st-thumb-del:hover { background: var(--danger); opacity: 1; }
.st-thumb-add { margin: 0; }
.st-thumb-add label { display: grid; place-items: center; align-content: center; gap: 2px; width: 92px; height: 68px; box-sizing: border-box; cursor: pointer;
    border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: 10px; color: var(--primary); font-size: 12px; font-weight: 700;
    background: var(--primary-soft); transition: background var(--t-fast); text-align: center; }
.st-thumb-add label:hover { background: color-mix(in srgb, var(--primary) 16%, transparent); }
.st-thumb-add input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.st-thumb-add label:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.st-dup { margin: 0; }
.st-dup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.st-dup .alert-text { flex: 1 1 320px; }
.st-dup form { margin: 0; }

/* Sayt: onlayn bron kartochkasi */
.st-booking { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 18px; scroll-margin-top: 90px; }
.st-booking.off { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); }
.st-booking-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.st-booking-text small { color: var(--muted); font-size: 13px; }
.st-booking form { margin: 0; }
.st-booking-more { font-size: 13px; white-space: nowrap; }
.st-todo a.bk-chip { text-decoration: none; }
@media (max-width: 760px) { .st-booking { flex-wrap: wrap; } .st-booking-text { flex-basis: calc(100% - 60px); } }

/* Sayt → Xona turlari: Revora'dan olingan parametrlar */
.st-pms-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius); background: var(--primary-soft); }
.st-pms-label { font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.st-room-extra > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.st-room-extra[open] { display: grid; gap: 10px; }

/* Korporativ pochta v2: sarlavha, ko'rsatkichlar, qutilar ro'yxati (amallar «⋯»da) */
.cm-logo { background: var(--primary-grad, var(--primary)); }
.cm-logo .ic { width: 26px; height: 26px; color: #fff; }
.bk-money.cm-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 14px; }
.cm-kpi > div:nth-child(3) { border-right: 1px solid var(--border); }
.cm-list { padding: 12px; }
.cm-list .st-list > li { flex-wrap: wrap; }
.cm-list .bk-row-text b { overflow-wrap: anywhere; }
.cm-list li.cm-off { opacity: .75; }
.cm-list li.cm-missing { border-style: dashed; opacity: .7; }
.cm-list .bk-row-text small.warn { color: var(--warning); font-weight: 600; }
@media (max-width: 760px) { .bk-money.cm-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cm-kpi > div:nth-child(2) { border-right: 0; } .cm-kpi > div:nth-child(n+3) { padding-top: 10px; border-top: 1px solid var(--border); } .cm-kpi > div.bk-bal { grid-column: auto; display: grid; grid-template-columns: none; } }
.cm-note { display: block; margin-bottom: 14px; }
.cm-note p { margin: 0; }
.cm-note p + p { margin-top: 4px; font-size: 13px; }
@media (min-width: 700px) { .set-item.set-open > .set-body .pms-req-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pms-settings .set-row .bk-row-text small { -webkit-line-clamp: 1; } }

/* ===== Kontragent kartasi v2 ===== */
.pt-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.pt-sheet-actions form { display: contents; }
.pt-facts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.pt-facts li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.pt-facts li:last-child { border-bottom: 0; }
.pt-facts li span { color: var(--muted); }
.pt-facts li b { text-align: right; overflow-wrap: anywhere; }
.pt-contract { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); margin: 0 0 10px; }
.pt-contract > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.pt-contract > summary::-webkit-details-marker { display: none; }
.pt-contract > summary .bk-chev { transition: transform var(--t-fast) var(--ease); }
.pt-contract[open] > summary .bk-chev { transform: rotate(90deg); }
.pt-contract > summary:hover { background: var(--surface-2); border-radius: var(--radius-lg); }
.pt-contract-body { padding: 0 14px 14px; border-top: 1px solid var(--border); }
.pt-contract-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 10px; }
.pt-contract-top p { margin: 0; }
.pt-page .bk-avatar { text-transform: uppercase; }
.bk-money.pt-mini { padding: 12px 0; margin-bottom: 12px; } .bk-money.pt-mini > div:last-child { border-right: 0; } .bk-money.pt-mini b { font-size: 17px; }

/* ===== Guruh kartasi v2 ===== */
.gr-avatar { color: #fff; }
.gr-avatar .ic { width: 24px; height: 24px; }
.gr-page .bk-hero .bk-chip .ic { width: 14px; height: 14px; }
.gr-hub { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.gr-members-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.gr-members-head .card-title { margin: 0; }
.gr-selected { font-size: 13px; }
.gr-selected.on { color: var(--primary); font-weight: 700; }
.gr-table .gr-sub { font-size: 12.5px; }
.gr-table td:first-child, .gr-table th:first-child { width: 36px; }
.gr-table tbody tr:has(input[name=members]:checked) { background: var(--primary-soft); }

/* ===== Ombor v2 ===== */
.inv-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.inv-tabs > a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.inv-tabs > a .ic { width: 18px; height: 18px; }
.inv-tabs > a:hover { background: var(--surface-2); color: var(--text); }
.inv-tabs > a.on { background: var(--primary-soft); color: var(--primary); }
.inv-badge { min-width: 20px; padding: 1px 7px; border-radius: 999px; font-size: 12px; background: var(--primary); color: #fff; text-align: center; }
.inv-badge.warn { background: var(--warning); }
.inv-setup { margin-left: auto; }
.inv-setup.on > summary { border-color: var(--primary); color: var(--primary); }
.inv-setup .menu-item.on { font-weight: 700; color: var(--primary); }
.inv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.inv-filter { flex: 1 1 260px; max-width: 420px; margin-bottom: 10px; }
.inv-tools .inv-filter { margin-bottom: 0; }
.inv-hub { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.inv-page .st-list form.inline-fields { flex-wrap: nowrap; }
.inv-page .st-list .preset-reset { display: inline; }
@media (max-width: 640px) { .inv-tabs > a { padding: 8px 10px; } .inv-tabs > a span { font-size: 13.5px; } .inv-setup { margin-left: 0; } }

/* ===== Reja va fakt v2 ===== */
.plan-page .bk-hero .bk-chip .ic { width: 14px; height: 14px; }
.pl-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pl-share .modal-head, .pl-share .hint { flex-basis: 100%; }
.pl-share select { flex: 1 1 200px; }
.pl-send { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.pl-send form { display: contents; }
.plan-page .bk-money .pf-up { color: var(--success); }
.plan-page .bk-money .pf-down { color: var(--danger); }
.pl-howto { margin: 4px 0 12px; } .pl-howto > summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 13.5px; } .pl-howto[open] > summary { margin-bottom: 8px; }

/* ===== F&B menyu v2 ===== */
.mn-cat { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 8px; font-size: 15px; }
.mn-cat:first-of-type { margin-top: 6px; }
.mn-cat small { font-weight: 600; }
.mn-list li { gap: 10px; }
.mn-list .mn-price { min-width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
.mn-list li.mn-stop { background: color-mix(in srgb, var(--warning) 6%, transparent); }
.mn-list li.mn-stop .mn-price { color: var(--muted); text-decoration: line-through; }
.mn-filter { margin: 0; flex: 0 1 300px; }
.mn-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; border: 0; padding: 0; margin: 0; }
.mn-checks legend { width: 100%; margin-bottom: 4px; font-weight: 600; font-size: 13px; color: var(--muted); }
.mn-recipe { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.mn-recipe-add { margin-top: 10px; flex-wrap: wrap; }
.mn-recipe-add select { flex: 1 1 220px; }
.mn-cost { font-weight: 600; }
.mn-outlets .mn-link select { max-width: 150px; font-size: 13px; padding: 4px 8px; }
.mn-cats li form.mn-cat-row { flex: 1; }
.mn-cat-row input[name=name] { flex: 1; }
.mn-cat-new { margin-top: 10px; }
@media (max-width: 640px) { .mn-list .mn-price { min-width: 0; } .mn-outlets .mn-link { flex-basis: 45%; } }

/* Qarzdorlik: uzun manba (1C izohlari) jadvalni kengaytirmasin — 2 qator, to'liq matn — sichqoncha ustida */
.debt-table .col-source { max-width: 240px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card.table-wrap { overflow-x: auto; }
.mn-hours { display: flex; align-items: center; gap: 8px; }
.mn-hours input { flex: 1 1 0; min-width: 0; }
#mnOutModal .form-grid > * { min-width: 0; }

/* Xona belgisi: «Нарсалари қолган» / «Багажсиз» — tozalikdan alohida */
.pms-flag-pill { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.pms-flag-pill::before { content: ""; width: 10px; height: 10px; flex: none; background: currentColor;
    -webkit-mask: 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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='16' height='14' x='4' y='7' rx='2'/%3E%3Cpath d='M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: 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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='16' height='14' x='4' y='7' rx='2'/%3E%3Cpath d='M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E") center / contain no-repeat; }
.pms-flag-pill.fl-ITEMS_LEFT { color: #b45309; background: color-mix(in srgb, #f59e0b 18%, transparent); }
.pms-flag-pill.fl-NO_LUGGAGE { color: #6d28d9; background: color-mix(in srgb, #7c3aed 14%, transparent); }
.pms-unit .pms-flag-pill { margin-top: 2px; }
.hk-flag-form { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }

/* Cheklist: belgilar bitta ustunda, chapda; matn yonida (uzun bo'lsa — keyingi qatorga) */
.hk-checks { display: grid; gap: 2px; text-align: left; }
.hk-checks .check { display: flex !important; align-items: flex-start; justify-content: flex-start; gap: 12px; width: 100%; margin: 0;
    padding: 9px 10px; border-radius: 8px; text-align: left; line-height: 1.35; cursor: pointer; }
.hk-checks .check:hover { background: var(--surface-2); }
.hk-checks .check input[type=checkbox] { flex: 0 0 20px; width: 20px !important; height: 20px; margin: 0; min-width: 0; padding: 0; }
.hk-checks .check span { flex: 1; min-width: 0; text-align: left; }
.hk-checks .check:has(input:checked) span { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.hk-checks .hk-check-all { justify-self: start; margin-top: 6px; }
/* Band qatori: belgi + matn | miqdor (ombor) | ✎ izoh (bajarilmagan sababi) */
.hk-check-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.hk-check-row > .check { flex: 1 1 0; min-width: 0; gap: 10px !important; padding-right: 4px !important; }
.hk-qty { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.hk-qty input { width: 58px; min-width: 0; padding: 6px 6px; text-align: right; }
.hk-miss-note { display: none; flex: 1 1 100%; margin: 0 0 6px 32px; }
.hk-check-row.hk-miss-open .hk-miss-note { display: block; }
.hk-check-row:has(input[type=checkbox]:checked) .hk-miss-btn { opacity: .45; }
.hk-qty small { color: var(--muted); font-size: 12px; }
.hk-check-row:has(input[type=checkbox]:not(:checked)) .hk-qty { opacity: .45; }
.hk-flag-miss { color: var(--warn-text, #6b4b00); background: var(--warn-bg, #fff4d6); border-radius: 999px; padding: 1px 8px; }
.hk-result { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 14px; }
.hk-result.hk-result-miss { background: var(--warn-bg, #fff4d6); color: var(--warn-text, #6b4b00); }
.hk-result-head { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hk-result-list { margin: 4px 0 0; padding-left: 18px; }
.hk-result-use { margin: 4px 0 0; }
/* «Сарф ва чеклист» hisoboti */
.hku-table td.num a, .hku-table th.num { text-align: right; }
.hku-miss { color: var(--warn-text, #6b4b00); }
.hku-rev { text-decoration: line-through; color: var(--muted); }

/* ===== Mulkdorlar, tadbir, mehmonxona v2 ===== */
.ow-actions .ow-month { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; }
.ow-actions .ow-month b { min-width: 120px; text-align: center; }
.ow-text { display: block; margin-top: 4px; font-size: 14px; color: var(--text); white-space: pre-line; }
.ev-add { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.ev-add .pms-sub { margin-top: 0; }
.ev-created { margin: -6px 2px 14px; font-size: 12.5px; }
.ht-page .bk-hero .bk-chip .ic, .ev-page .bk-hero .bk-chip .ic, .ow-page .bk-hero .bk-chip .ic { width: 14px; height: 14px; }

/* ===== Kabinet, kassa, smena grafigi, OTA bloki ===== */
.ota-box { margin: 0 0 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.ota-box .pms-sub { margin-top: 0; }
.ota-req { margin: 8px 0 0; font-size: 14px; }
.cs-desk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.cs-desk-head .bk-row-text { flex: 1 1 220px; }
.cs-desk .bk-money { margin: 12px 0 8px; }
.cs-methods { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cs-moves { margin: 8px 0; }
.cs-report { margin-top: 4px; }
.cs-desk.open { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); }
.sch-actions .sched-filter { display: inline-flex; gap: 6px; }
.sch-actions .ow-month { flex-wrap: wrap; }
.cab-page .bk-hero .bk-chip .ic, .cs-page .bk-hero .bk-chip .ic { width: 14px; height: 14px; }

/* Xonalar holati v2 */
.hk-seg { display: inline-flex; gap: 4px; }
.simple-screen .hk-hero { padding: 12px 14px; }
.simple-screen .hk-hero .bk-avatar { width: 40px; height: 40px; border-radius: 12px; }
/* Почтадан келган бронлар (pms/ota-mail.html) */
.om-steps { margin: 8px 0 6px 20px; padding: 0; text-align: left; justify-items: start; display: grid; gap: 4px; font-size: 14px; }
.om-page .bk-actions form { display: inline-flex; }
.om-page .bk-sheet .form-actions { flex-wrap: wrap; }
.om-page .bk-sheet .form-actions form { display: inline-flex; }
.om-add { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.om-add .pms-sub { margin-top: 0; }

/* ===== Ресепшн (шахматка) v2: ixcham sarlavha, amallar, «Кўриниш» oynasi ===== */
.desk-hero { padding-block: 14px; }
.desk-hero .bk-avatar { width: 44px; height: 44px; }
.desk-actions { margin-bottom: 12px; }
.desk-view { position: relative; }
.desk-view > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.desk-view > summary::-webkit-details-marker { display: none; }
.desk-view > summary .ic { width: 15px; height: 15px; }
.desk-view-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.desk-view-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: 300px; display: grid; gap: 10px; padding: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
.desk-view-pop.to-left { left: auto; right: 0; }
.desk-view-row { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; }
.desk-view-row select { width: 100%; min-width: 0; }
.desk-view-toggle { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer;
    padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text); background: var(--bg-soft, rgba(15, 23, 42, .04)); }
.desk-view-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.desk-switch { position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--border); transition: background .15s; flex: none; }
.desk-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.desk-view-toggle[aria-pressed="true"] .desk-switch { background: var(--primary); }
.desk-view-toggle[aria-pressed="true"] .desk-switch::after { transform: translateX(14px); }
.desk-view-keys { margin: 0; font-size: 12px; line-height: 1.45; border-top: 1px solid var(--border); padding-top: 8px; }
.desk-days .btn { min-width: 0; }
@media (max-width: 640px) {
    .desk-view-pop { width: min(300px, calc(100vw - 32px)); }
}
.desk-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 16px; row-gap: 10px; }
.desk-hero > .back-link { flex-basis: 100%; margin-bottom: 0; }
.desk-hero .desk-actions { margin: 0; flex-wrap: wrap; }
.desk-hero .desk-actions .action-more { margin-left: 0; }
.bk-hero.desk-hero { overflow: visible; }
@media (max-width: 760px) {
    .desk-hero .desk-actions { flex: 1 1 100%; flex-wrap: wrap; padding: 8px; }
    .desk-hero .desk-actions > .bk-main { flex: 1 1 100%; }
    .desk-hero .desk-actions > .btn:not(.bk-main) { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 8px; }
    .desk-hero .desk-actions > .action-more { flex: 0 0 auto; }
}
@media (max-width: 420px) { .desk-hero .desk-actions > .btn:not(.bk-main) .ic { display: none; } }
.chip-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; letter-spacing: .03em; vertical-align: middle; }
/* Ресепшн: «Бугун» қатори сарлавҳанинг юқори бўш жойида (орқага ҳаволаси билан бир қаторда) — шахматка юқорироқдан бошланади */
.desk-hero-top { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; min-width: 0; }
.desk-hero-top > .back-link { margin: 0; }
.pms-desk .desk-hero-top .pms-side { margin: 0 0 0 auto; justify-content: flex-end; }
@media (max-width: 760px) {
    .pms-desk .desk-hero-top .pms-side { margin: 0; justify-content: flex-start; flex-basis: 100%; }
}
/* Kanal kvotasi (xona turlari jadvali): «OTA 10», «Сайт 15» va mehmonxona jami */
.chip-quota { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.quota-total { margin: 10px 4px 0; font-size: 13px; }
/* Шахматка: хона рақами ҳеч қачон қисқармайди — жой етмаса аввал тур номи (код) қисқаради, ҳолат белгиси тўлиқ */
.pms-unit > b { flex: none; overflow: visible; }
.pms-unit > .pms-unit-cat { flex: 1 1 auto; min-width: 0; }
.pms-quote-note { margin: 10px 0 0; font-size: 13px; line-height: 1.45; }
/* Кутиш рўйхати: янги брон формасида (бўш хона йўқ) ва рўйхат саҳифаси */
.pms-wait { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); display: grid; gap: 10px; }
.pms-wait .hint { margin: 0; }
.pms-wait .btn { width: 100%; }
.wl-conv { margin: 4px 0 14px; font-size: 14px; color: var(--muted); }
.wl-conv b { color: var(--text); }
.wl-settings { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.wl-settings .field { margin: 0; max-width: 160px; }
/* Шахматка: хона катаги бир қаторда — рақам (ҳеч қачон қисқармайди) · тур коди (жой етмаса қисқаради) · тозалик нуқтаси ва 14 px белгилар.
   Ҳеч нарса қатордан чиқмайди; тўлиқ матн — aria-label ва босилганда изоҳ (data-tip). */
.pms-unit { flex-wrap: nowrap; overflow: hidden; }
.pms-unit-marks { flex: none; display: inline-flex; align-items: center; gap: 2px; margin-left: auto; }
.pms-ind { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; color: var(--muted); cursor: help; }
.pms-ind .ic { width: 14px; height: 14px; vertical-align: 0; }
.pms-ind:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.pms-ind.ic-occ { order: 1; color: var(--text); }
.pms-ind.ic-stay { order: 2; color: var(--danger); }
.pms-ind.fl-ITEMS_LEFT, .pms-legend-ic.lg-items { order: 3; color: #b45309; }
.pms-ind.fl-NO_LUGGAGE, .pms-legend-ic.lg-nolug { order: 3; color: #6d28d9; }
.pms-legend-ic.lg-stay { color: var(--danger); }
.pms-legend-ic.lg-occ { color: var(--text); }
.pms-hk-pill { --hk-dot: var(--primary); }
.pms-hk-pill.pms-ind { order: 0; width: 12px; }
.pms-hk-pill.pms-ind::before, .pms-legend i.pms-hk-pill { content: ""; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--hk-dot); box-sizing: border-box; }
.pms-legend i.pms-hk-pill { margin-right: 4px; }
.pms-hk-pill.hk-DIRTY { --hk-dot: var(--danger); }
.pms-hk-pill.hk-CLEANING { --hk-dot: #f59e0b; }
.pms-hk-pill.hk-CLEAN { --hk-dot: var(--primary); }
.pms-hk-pill.hk-INSPECTED { --hk-dot: var(--success); }
.pms-hk-pill.hk-REPAIR { --hk-dot: #9ca3af; }
.pms-hk-pill.hk-DND { --hk-dot: #7c3aed; }
.pms-hk-pill.hk-INSPECTION.pms-ind::before, .pms-legend i.pms-hk-pill.hk-INSPECTION { background: transparent; border: 2px solid #f59e0b; }
.pms-legend-hk { margin-top: 6px; font-size: 12.5px; color: var(--muted); gap: 6px 14px; }
.pms-legend-hk-title { font-weight: 600; color: var(--text); }
.pms-legend-ic { width: 14px; height: 14px; vertical-align: 0; }
:root[data-theme="dark"] .pms-ind.fl-ITEMS_LEFT, :root[data-theme="dark"] .pms-legend-ic.lg-items { color: #fbbf24; }
:root[data-theme="dark"] .pms-ind.fl-NO_LUGGAGE, :root[data-theme="dark"] .pms-legend-ic.lg-nolug { color: #c4b5fd; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pms-ind.fl-ITEMS_LEFT, :root:not([data-theme="light"]) .pms-legend-ic.lg-items { color: #fbbf24; }
    :root:not([data-theme="light"]) .pms-ind.fl-NO_LUGGAGE, :root:not([data-theme="light"]) .pms-legend-ic.lg-nolug { color: #c4b5fd; }
}
.pms-board.dense .pms-ind { height: 14px; }
/* Телефонда устун тор (112 px): «бугун тозаланмаган» бўлса «банд» белгиси яширилади (у ҳам бандни билдиради). */
@media (max-width: 560px) {
    .pms-unit-marks { gap: 1px; }
    .pms-ind { width: 14px; }
    .pms-ind .ic { width: 13px; height: 13px; }
    .pms-ind.ic-stay + .pms-ind.ic-occ { display: none; }
}
/* Хизматчи рўйхати: «Чиқиш (тўлиқ тозалаш)» ва «Яшаётган (кундалик тозалаш)» бўлимлари */
.hk-section { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; font-size: 15px; font-weight: 700; }
.hk-section:first-child { margin-top: 0; }
.hk-section-n { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; text-align: center; }
/* «Тозалаш режаси ва бажарилиши» */
.hkp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.hkp-kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.hkp-kpi b { font-size: 24px; font-variant-numeric: tabular-nums; }
.hkp-today td { background: var(--primary-soft); }

/* Xona turi oynasi: rasmlar (birinchisi — asosiy) va tavsif */
.cat-photos { display: grid; gap: 8px; }
.cat-photos .label { font-weight: 600; font-size: 13px; }
.cat-photos-note { margin: 0; font-size: 13px; }
.cat-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.cat-photo { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.cat-photo.main { border: 2px solid var(--primary); }
.cat-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-photo-main { position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--primary); color: #fff; }
.cat-photo-bar { position: absolute; inset: auto 0 0 0; display: flex; justify-content: flex-end; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); opacity: 0; transition: opacity var(--t-fast); }
.cat-photo:hover .cat-photo-bar, .cat-photo:focus-within .cat-photo-bar { opacity: 1; }
@media (hover: none) { .cat-photo-bar { opacity: 1; } }
.cat-photo-bar button { all: unset; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .92); color: #0f172a; font-size: 15px; font-weight: 700; }
.cat-photo-bar button:hover { background: #fff; }
.cat-photo-bar button.del:hover { background: var(--danger); color: #fff; }
.cat-photo-bar button:focus-visible { outline: 2px solid var(--accent); }
.cat-photo-bar button:disabled { opacity: .5; cursor: wait; }
.cat-photo-add { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 8px 14px; border: 1px dashed var(--border-strong); border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary); }
.cat-photo-add:hover { background: var(--primary-soft); }
.cat-photo-add.busy { opacity: .6; pointer-events: none; }
.cat-photo-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cat-photo-add .ic { width: 16px; height: 16px; }
.cat-photo-add:focus-within { box-shadow: var(--ring); }
.cat-link { all: unset; cursor: pointer; color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cat-link:focus-visible { outline: 2px solid var(--primary); }
.chip.chip-warn { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.text-bad { color: var(--danger); }

/* ===== Kontragent hisob-kitob jurnali va taqsimot oynasi ===== */
.lg-period { align-items: end; flex-wrap: wrap; }
.lg-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.lg-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 14px; padding: 14px 0; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg); }
.lg-kpi > div, .lg-kpi > .lg-tile { display: grid; gap: 2px; padding: 0 18px; border-right: 1px solid var(--border); min-width: 0; }
.lg-kpi > :last-child { border-right: 0; }
.lg-kpi small { color: var(--muted); font-size: 12.5px; }
.lg-kpi b { font-size: 19px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lg-kpi .lg-close b { font-size: 21px; }
.lg-kpi b.lg-adv, table.lg-table td.pos { color: var(--success); }
.lg-kpi .muted { font-size: 12px; }
.lg-hub { margin-bottom: 14px; }
.lg-table-wrap { padding: 0; }
table.lg-table td { vertical-align: top; }
table.lg-table tr.rt-child td:first-child { padding-left: 12px; }
table.lg-table .nowrap { white-space: nowrap; }
.lg-type { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.lg-type.lg-charge, .lg-type.lg-group_charge, .lg-type.lg-opening { color: var(--text); }
.lg-type.lg-payment, .lg-type.lg-booking_payment { color: var(--success); }
.lg-type.lg-refund, .lg-type.lg-booking_refund { color: var(--danger); }
.lg-docs { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: 8px; font-size: 12.5px; }
.lg-leg-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 8px; vertical-align: middle; }
.lg-leg-actions form { display: inline; margin: 0; }
.lg-note { margin-top: 10px; font-size: 13px; }
.lg-modal { width: min(720px, calc(100vw - 32px)); }
.lg-targets { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.lg-target { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; align-items: center; gap: 10px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
label.lg-target.lg-target-main { grid-template-columns: auto minmax(0, 1fr) auto; cursor: pointer; }
.lg-target.on { border-color: var(--primary, #2563eb); background: var(--surface-2); }
.lg-target-main { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; margin: 0; }
.lg-target-no { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 999px;
    font-size: 12px; font-weight: 700; background: var(--primary, #2563eb); color: #fff; }
.lg-target-no:empty { display: none; }
.lg-target-text { display: grid; min-width: 0; }
.lg-target-text small { color: var(--muted); overflow-wrap: anywhere; }
.lg-target-bal { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.lg-target-bal small { font-size: 12px; }
.lg-target-amt input[disabled] { opacity: .45; }
.lg-sum { margin-top: 8px; }
@media (max-width: 760px) {
    .lg-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
    .lg-kpi > :nth-child(2) { border-right: 0; }
    .lg-target { grid-template-columns: minmax(0, 1fr) auto; }
    .lg-target-amt { grid-column: 1 / -1; }
    .lg-quick { margin-left: 0; }
}

/* Kontragent «Қарз ва тўловлар»: har bo'lim — alohida blok (sarlavha chizig'i + ramkali jadval) */
.pt-sections > h4.pms-sub { margin: 22px 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2);
    border-left: 3px solid var(--accent, #3b82f6); font-size: .9rem; font-weight: 700; }
.pt-sections > .table-wrap { border: 1px solid var(--border); border-radius: 12px; padding: 4px 10px; background: var(--surface); }
.pt-sections > p.muted { margin: 0; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; }

/* Resepshn «Бугун бўш: N / jami» — bosilganda xona turlari bo'yicha bo'sh xonalar */
.free-pop { position: relative; display: inline-block; }
.free-pop > summary { list-style: none; cursor: pointer; }
.free-pop > summary::-webkit-details-marker { display: none; }
.free-pop-caret { font-size: .75em; opacity: .7; margin-left: 2px; }
.free-pop[open] .free-pop-caret { transform: rotate(180deg); display: inline-block; }
.free-pop-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 260px; max-height: 60vh; overflow: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.25); padding: 6px; }
.free-pop-head, .free-pop-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 10px; }
.free-pop-head { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.free-pop-row { border-radius: 8px; font-size: .9rem; }
.free-pop-row:hover { background: var(--surface-2); }
.free-pop-row b { color: var(--success, #16a34a); font-variant-numeric: tabular-nums; }
.free-pop-row.full b { color: var(--danger, #dc2626); }
/* ===== To'g'ridan-to'g'ri kanal ulanishi (PMS → Каналлар → Тўғридан-тўғри уланиш) ===== */
.cn-card { display: grid; gap: 12px; }
.cn-head .card-title { display: inline; margin-right: 8px; }
.cn-health { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; margin: 0; }
.cn-health div { display: grid; gap: 2px; }
.cn-health dt { font-size: .8rem; color: var(--muted, #6b7280); }
.cn-health dd { margin: 0; font-weight: 600; }
.cn-map input { width: 100%; max-width: 220px; }
.cn-map .cn-map-room td { padding-top: 12px; }
.cn-note { margin: 0; }
.cn-rank { display: inline-block; min-width: 2.2em; margin-right: 6px; padding: 1px 6px; border-radius: 999px; font-size: .75rem; font-weight: 700;
    text-align: center; color: var(--primary); background: var(--primary-soft); vertical-align: middle; }
.cn-geo { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 12px; }
.cn-price tr.bad td { color: var(--danger, #dc2626); }
.cn-price { overflow-x: auto; display: block; }
.cn-app { white-space: pre-wrap; word-break: break-word; max-height: 60vh; overflow: auto; background: var(--surface-2, #f6f7f9); border-radius: 8px;
    padding: 12px; font-size: .85rem; margin: 0 0 12px; }
.pt-sec { margin: 10px 0 0; }
.pt-sec > summary.pt-sec-head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 10px 14px;
    border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--accent); font-weight: 700; font-size: .92rem; user-select: none; }
.pt-sec > summary.pt-sec-head::-webkit-details-marker { display: none; }
.pt-sec > summary.pt-sec-head::after { content: "▸"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.pt-sec[open] > summary.pt-sec-head::after { transform: rotate(90deg); }
.pt-sec > summary.pt-sec-head:hover { filter: brightness(1.08); }
.pt-sec-body { padding: 8px 0 4px; }
.pt-sec-body > .table-wrap { border: 1px solid var(--border); border-radius: 12px; padding: 4px 10px; background: var(--surface); }
.pt-sec-body > p.muted { margin: 0; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; }

/* Hisob-kitob jurnali 2: bosiladigan raqamlar, kredit limiti, filtr / hisoblagichlar, ustunlar, holat belgilari, chop etish */
.lg-kpi > .lg-tile { font: inherit; color: inherit; text-align: left; background: none; border-top: 0; border-bottom: 0; border-left: 0; cursor: pointer;
    justify-items: start; border-radius: 0; transition: background .15s; }
.lg-kpi > .lg-tile:hover, .lg-kpi > .lg-tile:focus-visible { background: var(--surface-2); }
.lg-kpi > .lg-tile b { text-decoration: underline dotted; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
.lg-credit { display: grid; gap: 8px; margin: 0 0 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.lg-credit-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; align-items: baseline; font-variant-numeric: tabular-nums; }
.lg-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.lg-bar i { display: block; height: 100%; border-radius: inherit; background: var(--success); transition: width .3s; }
.lg-credit-warn .lg-bar i { background: var(--warning); }
.lg-credit-warn .lg-credit-pct { color: var(--warning); }
.lg-credit-over { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.lg-credit-over .lg-bar i { background: var(--danger); }
.lg-credit-over .lg-credit-pct { color: var(--danger); }
.lg-credit-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-chip-bad { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.lg-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.lg-tools .lg-search { flex: 1 1 220px; min-width: 0; }
.lg-tools select { flex: 0 1 auto; max-width: 100%; }
.lg-cols { position: relative; }
.lg-cols > summary { list-style: none; }
.lg-cols > summary::-webkit-details-marker { display: none; }
.lg-cols-menu { position: absolute; z-index: 20; right: 0; top: calc(100% + 6px); display: grid; gap: 6px; min-width: 200px; padding: 10px 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); }
.lg-cols-menu label { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.lg-counters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.lg-cnt { display: inline-flex; gap: 4px; align-items: baseline; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; background: var(--surface-2);
    color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.lg-cnt b { color: var(--text); font-variant-numeric: tabular-nums; }
.lg-cnt-money { background: var(--primary-soft, var(--surface-2)); border-color: transparent; }
.lg-filtered { font-size: 12.5px; }
.lg-bal-note { margin: 0 0 8px; font-size: 12.5px; }
tr.lg-off { display: none; }
.bk-status.lg-st { padding: 1px 8px; font-size: 11.5px; margin: 1px 4px 1px 0; }
.bk-status.lg-st::before { width: 6px; height: 6px; box-shadow: none; animation: none; }
td.lg-overdue, .lg-overdue { color: var(--danger); font-weight: 700; }
table.lg-table.lg-bal-off .lg-bal { opacity: .35; }
table.lg-table tr.lg-flash td { background: var(--warning-soft); transition: background .4s; }
table.lg-table.lgc-hide-st [data-col="st"], table.lg-table.lgc-hide-rt [data-col="rt"], table.lg-table.lgc-hide-stay [data-col="stay"],
table.lg-table.lgc-hide-n [data-col="n"], table.lg-table.lgc-hide-g [data-col="g"], table.lg-table.lgc-hide-bal [data-col="bal"],
table.lg-table.lgc-hide-due [data-col="due"], table.lg-table.lgc-hide-who [data-col="who"] { display: none; }
.lg-drill .lg-guest { display: block; font-size: 12px; }
table.lg-dt td { vertical-align: top; }
table.lg-dt tr.rt-child td:first-child { padding-left: 12px; }
.lg-aside-title { margin: 18px 0 4px; }
.lg-send-docs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.lg-send-doc { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; margin: 0; }
.lg-send-facts b { overflow-wrap: anywhere; text-align: right; }
@media (max-width: 760px) {
    .lg-cols-menu { right: auto; left: 0; }
    .lg-credit { padding: 10px 12px; }
}
@media print {
    .lg-page .no-print, .lg-tools, .lg-bal-note, .lg-cols, dialog, .lg-docs, .lg-leg-actions, .rt-toggle { display: none !important; }
    .lg-kpi > .lg-tile b { text-decoration: none; }
    table.lg-table.lg-bal-off .lg-bal { opacity: 1; }
}

/* Тўғридан-тўғри уланиш: kanallar ro'yxati — nomi bosilsa ochiladi */
.cn-row { padding: 0; margin-bottom: 8px; }
.cn-row > summary.cn-head { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 10px; }
.cn-row > summary.cn-head::-webkit-details-marker { display: none; }
.cn-row > summary.cn-head::after { content: "▸"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.cn-row[open] > summary.cn-head::after { transform: rotate(90deg); }
.cn-row > summary.cn-head:hover { background: var(--surface-2); border-radius: 12px; }
.cn-row > summary .card-title { display: inline; margin: 0 8px 0 4px; }
.cn-row > .cn-body { padding: 0 18px 16px; border-top: 1px solid var(--border); }
/* ===== Drill-down: ma'lumotdan olingan har son (fragments/num) — bosilsa, uni tashkil qilgan qatorlar ===== */
a.num-drill { color: inherit; text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
    text-underline-offset: 3px; cursor: pointer; font-variant-numeric: tabular-nums; }
a.num-drill:hover, a.num-drill:focus-visible { text-decoration-style: solid; text-decoration-color: currentColor; }
.drill-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.drill-filters .chip { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }
.drill-counters .drill-main { border-color: currentColor; }
.drill-counters .drill-main b { font-size: 18px; }
.drill-table tr.drill-row { cursor: pointer; }
.drill-table tr.drill-row:hover td { background: var(--surface-2); }
.drill-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
@media (max-width: 640px) { .drill-table { font-size: 13px; } }
/* Drill-down: yig'ma son bosiladi — o'zini tashkil qilgan qatorlar ochiladi (KPI plitkalari, modallar). */
a.num-link { color: inherit; text-decoration: none; cursor: pointer; }
a.num-link:hover, a.num-link:focus-visible { text-decoration: underline dotted; text-underline-offset: 4px; color: var(--primary, inherit); }
a.num-link.stat-value, a.num-link.v { display: block; }
.num-link.stat-sub, a.num-link.sub { display: block; }
button.num-link.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
a.num-link.aging-sum { display: block; }
a.num-link.aging-sum.selected b { text-decoration: underline; }
button.num-drill { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted;
    text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
/* Qarz trendi (debt-trend.html) */
svg.debt-trend { width: 100%; height: 200px; color: var(--primary); overflow: visible; }
svg.debt-trend circle { fill: currentColor; }
/* ---------- Tezlik (docs/performance.md): yuklanish chizig'i, «Секин алоқа», skelet, tez tugmalar ---------- */
/* Tepada yuklanish chizig'i — sahifa almashayotganda / forma yuborilganda (app.js RevoraNav). html ichida turadi (body almashadi). */
#rvProgress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2147483000; pointer-events: none;
    background: linear-gradient(90deg, var(--accent), var(--primary)); transform-origin: 0 50%; transform: scaleX(0);
    opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
#rvProgress.on { opacity: 1; }
/* So'rov 2,5 soniyadan uzoq — pastda kichik belgi; internet yo'q — qizil. */
#rvSlow {
    position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2147483001;
    padding: 7px 14px; border-radius: 999px; font: 600 13px/1.3 inherit; font-family: inherit;
    background: var(--warning-soft); color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
    box-shadow: var(--shadow); pointer-events: none; animation: fadeIn .2s ease;
}
#rvSlow.off { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
#rvSlow[hidden] { display: none; }
body.has-tabbar ~ #rvSlow, body.has-tabbar #rvSlow { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.rv-toast { position: fixed; right: 16px; top: 72px; z-index: 2147483001; max-width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); animation: toastIn .2s ease; }
@media (max-width: 600px) { .rv-toast { left: 16px; right: 16px; } }
/* Serverdan yuklanayotgan oyna — skelet (darhol ko'rinadi). */
.rv-skel { display: grid; gap: 12px; padding: 6px 0 12px; }
.rv-skel i {
    display: block; height: 14px; border-radius: 7px;
    background: linear-gradient(90deg, var(--surface-2) 0%, var(--border) 50%, var(--surface-2) 100%); background-size: 200% 100%;
    animation: ai-shimmer 1.1s linear infinite;
}
.rv-skel i.short { width: 55%; }
.modal > .form > .rv-skel { padding: 4px 0 8px; }
/* Forma yuborilmoqda: bosilgan tugma — darhol «bosilgan», javob kelguncha qayta bosilmaydi; tez tugma (xona holati) — natija oldindan. */
form[aria-busy="true"] { cursor: progress; }
.btn.rv-pressed { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent); opacity: .8; }
.badge.rv-optimistic { outline: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { #rvProgress { transition: none; } .rv-skel i { animation: none; } }
/* Kontragentlar: papkalar daraxti (chapda) va ro'yxat; guruhlar filtri */
.pt-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pt-filter input[type=search] { min-width: 220px; }
.pt-layout { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 14px; align-items: start; }
.pt-tree { padding: 8px; display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow-y: auto; }
.pt-tree-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none;
    font-size: 14px; overflow-wrap: anywhere; }
.pt-tree-row:hover { background: var(--surface-2); }
.pt-tree-row.on { background: var(--surface-2); color: var(--primary); font-weight: 700; }
.pt-tree-empty { font-size: 13px; padding: 6px 10px; }
.pt-main { min-width: 0; }
.pt-folder-row td { background: var(--surface-2); }
.pt-inline { display: inline-flex; gap: 6px; align-items: center; margin: 4px 0; }
.pt-inline input[type=text] { max-width: 220px; }
.pt-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 14px 0; }
.pt-edit-grid h3 { margin: 0 0 6px; font-size: 16px; }
.grp-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0 0 12px; }
.grp-filter .field { margin: 0; }
.grp-filter input, .grp-filter select { max-width: 180px; }
.grp-counters { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 10px; font-size: 14px; }
th a.sort { color: inherit; text-decoration: none; white-space: nowrap; }
th a.sort:hover { color: var(--primary); }
@media (max-width: 760px) { .pt-layout { grid-template-columns: 1fr; } .pt-tree { max-height: 220px; } }

/* ---------- Oflayn (docs/performance.md 2-qadam): navbat holati (tepada) va oflayn nusxa banneri — app.js RevoraSync ---------- */
.rv-sync { position: relative; flex: none; }
.rv-sync[hidden] { display: none; }
.rv-sync-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 11px;
    border-radius: 12px; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
    font: 600 13px/1 inherit; font-family: inherit; white-space: nowrap;
}
.rv-sync-btn:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.rv-sync-text:empty { display: none; }
.rv-sync-ico { width: 9px; height: 9px; border-radius: 50%; background: var(--success); flex: none; }
.rv-sync-wait .rv-sync-btn { color: var(--warning); background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.rv-sync-wait .rv-sync-ico { background: var(--warning); }
.rv-sync-busy .rv-sync-ico { background: var(--primary); animation: rvSyncPulse 1s ease-in-out infinite; }
.rv-sync-err .rv-sync-btn { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.rv-sync-err .rv-sync-ico { background: var(--danger); }
.rv-sync-off .rv-sync-ico { background: var(--muted); }
.rv-sync-err .rv-sync-text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
@keyframes rvSyncPulse { 50% { opacity: .3; } }
.rv-sync-pop {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(360px, calc(100vw - 32px));
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
    padding: 12px; font-size: 14px; white-space: normal;
}
.rv-sync-pop[hidden] { display: none; }
.rv-sync-head { margin: 0 0 8px; font-weight: 700; }
.rv-sync-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 50vh; overflow: auto; }
.rv-sync-list li { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--border); }
.rv-sync-list li > span { display: grid; gap: 2px; min-width: 0; }
.rv-sync-list b { font-weight: 600; overflow-wrap: anywhere; }
.rv-sync-list small { color: var(--muted); }
.rv-sync-list small.rv-sync-err { color: var(--danger); }
.rv-sync-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-sync-actions [hidden] { display: none; }
.simple-top .rv-sync { margin-left: auto; }
@media (max-width: 600px) { .rv-sync-err .rv-sync-text, .rv-sync-wait .rv-sync-text { max-width: 120px; overflow: hidden; text-overflow: ellipsis; } }
.rv-offline-copy { position: sticky; top: 0; z-index: 15; font-weight: 600; }
@media print { .rv-sync, .rv-offline-copy { display: none !important; } }

/* Google feed manzillari (admin/connect-google): har biri alohida qator — uzun manzil sig'adi, ustma-ust tushmaydi */
.feed-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 12px; }
.feed-list li { display: grid; gap: 4px; min-width: 0; }
.feed-name { font-size: .85rem; color: var(--muted); }
.feed-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.feed-url { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-all; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }

/* «Режа ва факт» → Telegram: qabul qiluvchilar ixcham ro'yxat; bosilsa — sozlama oynasi */
.rcp-list { list-style: none; margin: 8px 0 12px; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.rcp-list li + li { border-top: 1px solid var(--border); }
.rcp-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; background: transparent; border: 0; color: inherit;
    font: inherit; text-align: left; cursor: pointer; flex-wrap: wrap; }
.rcp-row:hover, .rcp-row:focus-visible { background: var(--surface-2); }
.rcp-row.is-off .rcp-name { opacity: .6; }
.rcp-name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.rcp-sum { flex: 1 1 220px; min-width: 0; font-size: .9rem; }
.rcp-chev { margin-left: auto; font-size: 1.3rem; color: var(--muted); }
/* Qabul qiluvchi sozlama oynasi: ichki chekinma, sarlavha qatori, hisobot qatorlari bir xil ustunlarda */
dialog.modal.recipient { width: min(760px, calc(100vw - 32px)); padding: 20px 24px 22px; }
dialog.modal.recipient .recipient-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; padding: 0 0 14px;
    border-bottom: 1px solid var(--border); }
dialog.modal.recipient .recipient-head strong { font-size: 1.05rem; }
dialog.modal.recipient .recipient-head .modal-close { margin-left: auto; order: 9; position: static; }
dialog.modal.recipient .recipient-actions { order: 10; flex-basis: 100%; margin-left: 0; display: flex; gap: 8px; }
dialog.modal.recipient .recipient-form { display: grid; gap: 14px; }
dialog.modal.recipient .recipient-reports { display: grid; grid-template-columns: 200px 120px 1fr; align-items: center; gap: 8px 14px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
dialog.modal.recipient .recipient-reports + .recipient-reports { margin-top: 0; }
dialog.modal.recipient .recipient-days { display: flex; flex-wrap: wrap; gap: 6px 12px; }
dialog.modal.recipient .recipient-form > .btn { justify-self: end; min-width: 140px; }
@media (max-width: 640px) {
    dialog.modal.recipient { padding: 16px; }
    dialog.modal.recipient .recipient-reports { grid-template-columns: 1fr auto; }
    dialog.modal.recipient .recipient-days { grid-column: 1 / -1; }
}

/* «Тизим ҳолати»: chapda server jadvali, o'ngda Telegram va agentlar (siqilmaydi); tor ekranda — ustma-ust */
.sys-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.sys-grid > .card { margin: 0; min-width: 0; }
.sys-side { display: grid; gap: 0; padding: 0; overflow: hidden; }
.sys-block { padding: 20px 24px; }
.sys-block + .sys-block { border-top: 1px solid var(--border); }
.sys-block .card-title { margin: 0 0 12px; }
.sys-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; overflow-wrap: anywhere; }
.sys-block .plain-list { margin: 0 0 12px; display: grid; gap: 8px; }
.sys-block .muted { margin: 0 0 12px; }
@media (max-width: 1000px) { .sys-grid { grid-template-columns: 1fr; } }

/* ---------- Mehmon ilovasini sozlash (crm/guest-setup): ro'yxat → oyna, jonli telefon ko'rinishi ---------- */
.gs-list { padding: 4px 0; }
.gs-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.gs-row:last-child { border-bottom: 0; }
.gs-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.gs-row-text small { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.gs-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border); }
.gs-brand { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: start; }
@media (max-width: 640px) { .gs-brand { grid-template-columns: minmax(0, 1fr); } .gs-phone { justify-self: center; } }
.gs-color { display: flex; gap: 8px; align-items: center; }
.gs-color input[type=color] { width: 44px; height: 38px; padding: 2px; border-radius: 8px; flex: none; }
.gs-warn { margin: 6px 0 0; }
.gs-phone { width: 220px; height: 400px; border-radius: 30px; border: 8px solid #10131c; background: var(--g-bg); padding: 12px 10px; overflow: hidden;
    display: flex; flex-direction: column; gap: 8px; color: var(--g-text); font-size: 12px; box-shadow: 0 12px 30px rgba(15, 23, 42, .25); }
.gs-ph-top { display: flex; align-items: center; gap: 6px; color: var(--g-text); }
.gs-ph-top b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.gs-ph-logo { max-height: 22px; max-width: 70px; object-fit: contain; }
.gs-ph-lang { background: var(--g-card); border-radius: 999px; padding: 2px 6px; }
.gs-ph-card { background: var(--g-card); color: var(--g-text); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.gs-ph-card small { opacity: .75; }
.gs-ph-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gs-ph-tiles span { background: var(--g-card); border-radius: 10px; height: 46px; display: grid; place-items: center; font-size: 18px; }
.gs-ph-btn { display: block; margin-top: 6px; background: var(--g-primary); color: var(--g-on-primary); border-radius: 9px; padding: 8px; text-align: center; font-weight: 600; }
.gs-order { list-style: none; margin: 8px 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; }
.gs-order-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.gs-order-row:last-child { border-bottom: 0; }
.gs-order-row > .check { flex: 1; margin: 0; }
.gs-order-row.gs-future { opacity: .6; }
.gs-def { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.gs-move { display: flex; gap: 4px; }
.gs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }

/* Платформа → «Иловалар ва ботлар» (admin/apps.html) */
.apps-list li { flex-wrap: wrap; }
.apps-list .bk-row-text { flex: 1 1 260px; min-width: 0; }
.apps-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.apps-sha { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.apps-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.apps-off .bk-row-text b { opacity: .7; }
.apps-qr { display: flex; justify-content: center; padding: 8px 0; }
.apps-qr svg { width: 200px; height: 200px; max-width: 100%; border-radius: 8px; }
.apps-link { text-align: center; word-break: break-all; }
.apps-seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.apps-seg label { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; }
.apps-seg label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.apps-pane { border: 0; padding: 0; margin: 0; min-width: 0; }
@media (max-width: 640px) { .apps-actions { margin-left: 0; width: 100%; } }

/* Bron kartasi → «📱 Меҳмон иловаси» oynasi */
dialog.modal.guest-app-dlg { width: min(640px, calc(100vw - 32px)); }
dialog.modal.guest-app-dlg .field { padding: 0 20px 18px; margin: 0; }
dialog.modal.guest-app-dlg .pms-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
dialog.modal.guest-app-dlg .pms-actions input { flex: 1 1 100%; }

/* «Фақат кўриш» rejimida o'chirilgan tugmalar — sababi tugma ustida (title) */
.rv-readonly-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Revora Desk — «Қурилмалар» (pms/desk.html) */
.desk-code-card { padding: 18px; text-align: center; }
.desk-code { font: 700 34px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 4px; margin: 8px 0; color: var(--primary, #1d3b6f); }
.desk-row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.desk-row-actions form { margin: 0; }
.desk-set { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 12px; margin: 12px 0 0; }
.desk-set legend { font-weight: 600; padding: 0 6px; }
.desk-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0; }
@media (max-width: 640px) { .desk-page .gs-row { flex-direction: column; align-items: stretch; } .desk-row-actions { justify-content: flex-start; } }

/* Mehmon ilovasi mazmuni (2-bosqich): yo'llanma, Wi-Fi, banner/aksiya, sharh havolalari, do'kon — ro'yxat va tarjima yorliqlari */
.gs-sub { margin: 18px 0 8px; font-size: 15px; color: var(--muted); }
.gc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.gc-head h3 { flex: 1; margin: 0; }
.gc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-chip { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; }
.gc-chip form { margin: 0; }
.gc-chip.off, .gc-row.off { opacity: .6; }
.gc-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.gc-row:last-child { border-bottom: 0; }
.gc-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--primary-soft); }
.gc-thumb.gc-wide { width: 96px; }
.gc-noimg { display: grid; place-items: center; font-size: 24px; }
.gc-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.gc-acts form { margin: 0; }
.gc-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gc-photos form { position: relative; margin: 0; }
.gc-photos img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
.gc-x { position: absolute; top: -6px; inset-inline-end: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #b42318; color: #fff;
    font-size: 13px; line-height: 20px; padding: 0; cursor: pointer; }
.gc-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 2px 10px; max-height: 220px; overflow-y: auto;
    border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.gc-units .check { margin: 0; }
.gc-tr { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.gc-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 8px; }
.gc-tab { border: 1px solid var(--border); background: transparent; border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; color: inherit; }
.gc-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
@media (max-width: 560px) { .gc-row { flex-wrap: wrap; } .gc-acts { width: 100%; justify-content: flex-start; } }
/* Меҳмон иловаси 3-босқич: «Овоз» режими, уйғотиш, хизматлар созламаси */
.ga-unlock { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--warn-bg, #fff4d6); color: var(--warn-text, #6b4b00); font-size: 14px; }
tr.ga-ringing td { background: var(--warn-bg, #fff4d6); }
#gaInbox .pms-actions form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gs-hours { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 10px; align-items: center; }
.gs-hours label { margin: 0; }
.gs-imp-table td.err { color: var(--danger, #b42318); }
.gs-imp-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--soft, #eef2f7); }
.gs-imp-badge.CREATE { background: #e3f6ea; color: #17663a; } .gs-imp-badge.UPDATE { background: #e6f0fb; color: #1f4f8f; } .gs-imp-badge.SKIP { background: #fde8e8; color: #9b1c1c; }

/* «Янги парол бериш» (layout :: pwNew) ва «Сақлаш»дан кейинги бир марталик хабар (layout :: alerts → .pw-issued). */
.pw-new { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--primary); border-radius: 10px; background: var(--primary-soft); }
.pw-new[hidden], [data-pw-off][hidden] { display: none; }
.pw-new-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pw-new-row input[name=newPassword] { flex: 1 1 160px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; letter-spacing: .06em; }
.pw-issued .pw-issued-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 6px 0; }
.pw-issued code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface, #fff); color: var(--text, inherit); user-select: all; }
.pw-issued .hint { display: block; }
/* Bosh sahifa: «⚙ Дашборд» (qaysi mehmonxonalar ko'rinadi), kartochkada «Яшириш» va «Режа / Факт» */
.dash-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.dash-hidden-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; }
.hotel-hide { position: absolute; right: 50px; top: 24px; color: var(--muted); opacity: 0; cursor: pointer; line-height: 0; padding: 2px; border-radius: 6px; transition: opacity var(--t); }
.hotel-card:hover .hotel-hide, .hotel-hide:focus-visible { opacity: 1; }
.hotel-hide:hover { color: var(--danger); }
@media (hover: none) { .hotel-hide { opacity: .6; } }
.hotel-plan { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 2px; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.hotel-plan .k { color: var(--muted); font-size: 12px; font-weight: 600; display: block; }
.hotel-plan-link { cursor: pointer; flex: 1; min-width: 0; }
.hotel-plan-link:hover .hotel-plan-text, .hotel-plan-link:focus-visible .hotel-plan-text, .hotel-plan-link.muted:hover { text-decoration: underline; }
.hotel-plan-text b.pf-good { color: var(--success); }
.hotel-plan-text b.pf-mid { color: var(--warning); }
.hotel-plan-text b.pf-bad { color: var(--danger); }
.hotel-plan-bar, .dash-pf-bar { display: block; height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.hotel-plan-bar span, .dash-pf-bar span { display: block; height: 100%; border-radius: 999px; }
.hotel-plan-bar .pf-good, .dash-pf-bar .pf-good { background: var(--success); }
.hotel-plan-bar .pf-mid, .dash-pf-bar .pf-mid { background: var(--warning); }
.hotel-plan-bar .pf-bad, .dash-pf-bar .pf-bad { background: var(--danger); }

/* add icon 13.11 — «Қўшиш» belgili tugmalar (fragments/layout :: icoAdd).
   Yolg'iz «Қўшиш» (forma qatori, modal oxiri): .btn-act.btn-act-add (+ .btn-act-lg) — kvadrat, to'ldirilgan, saqlash bilan bir oila.
   Nima qo'shilishi yozilgan tugma: .btn.btn-add — yumaloq «pill»: belgi + qisqa yozuv (.btn-add-txt); telefonda faqat belgi. */
.ico-add { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.14em; flex: none; }
summary .ico-add, b > .ico-add { margin-right: 2px; }
.btn-act-add { color: #fff; background: var(--primary-grad); border-color: transparent; box-shadow: 0 3px 10px rgba(30, 58, 138, .22); }
.btn-act-add:hover, .btn-act-add:focus-visible { color: #fff; background: var(--primary-grad); border-color: transparent; box-shadow: 0 5px 16px rgba(30, 58, 138, .34); transform: translateY(-1px); }
.btn-act-add:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent), 0 5px 16px rgba(30, 58, 138, .3); }
.btn-act-add:active { transform: scale(.94); }
.btn-act.btn-act-add svg { width: 17px; height: 17px; stroke-width: 2.4; }
.btn-act-lg.btn-act-add svg { width: 20px; height: 20px; }
form[aria-busy="true"] .btn-act-add:disabled { opacity: .9; cursor: progress; }
form[aria-busy="true"] .btn-act-add:disabled svg { visibility: hidden; }
form[aria-busy="true"] .btn-act-add:disabled::after {
    content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: btn-act-spin .8s linear infinite; }
/* Yozuvli qo'shish tugmasi */
.btn.btn-add { position: relative; gap: 7px; border-radius: 999px; padding-left: 13px; padding-right: 17px; }
.btn.btn-sm.btn-add { gap: 5px; padding-left: 9px; padding-right: 13px; }
.btn.btn-add > .ico-add { width: 17px; height: 17px; stroke-width: 2.4; vertical-align: 0; }
.btn.btn-sm.btn-add > .ico-add { width: 15px; height: 15px; }
.btn-secondary.btn-add > .ico-add { color: var(--primary); }
.btn-secondary.btn-add:hover > .ico-add { transform: rotate(90deg); }
.btn.btn-add > .ico-add { transition: transform var(--t) var(--ease); }
.btn-add-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.btn.btn-add:disabled, .btn.btn-add[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
@media (max-width: 640px) {
    .btn.btn-add:not(.bk-main) { width: 40px; height: 40px; padding: 0; gap: 0; justify-content: center; flex: none; }
    .btn.btn-sm.btn-add:not(.bk-main) { width: 36px; height: 36px; }
    .btn.btn-add:not(.bk-main) > .btn-add-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .btn.btn-add:not(.bk-main) > .ico-add { width: 19px; height: 19px; }
}
@media print { .btn-add { display: none !important; } }
/* Смена топшириш (13.11): кенг майдон, 5 плитка бир қаторда, «Диққат» — ихчам жадвал (бир қатор = бир брон ёки гуруҳ), эслатма — бир қатор */
.container.ho-page { max-width: 1680px; }
.ho-kpis { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
.ho-kpis .card { padding: 10px 14px; gap: 2px; align-content: start; }
.ho-kpis b { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.ho-kpis .muted { font-size: 12.5px; }
.ho-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; margin-top: 14px; }
.ho-attn .card-title { margin-bottom: 4px; }
.ho-block + .ho-block { margin-top: 12px; }
.ho-block-head { display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; font-size: .9rem; }
.ho-block.warn .ho-block-head > span:first-child { color: color-mix(in srgb, var(--warning) 75%, var(--text)); }
.ho-count { margin-left: auto; font-size: 12.5px; background: var(--surface-2); border-radius: 999px; padding: 0 9px; font-variant-numeric: tabular-nums; }
.ho-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13.5px; }
.ho-table td { padding: 5px 8px; border-top: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.ho-block.warn .ho-table tr td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
.ho-table tr:hover td { background: var(--surface-2); }
.ho-table .ho-guest { width: 42%; }
.ho-table .ho-guest a { color: var(--text); }
.ho-table .ho-guest a:hover { color: var(--primary); }
.ho-table .ho-guest .badge { margin-left: 6px; font-size: 11.5px; }
.ho-table .ho-units { width: 26%; }
.ho-table .ho-date { width: 12%; font-variant-numeric: tabular-nums; }
.ho-table .ho-amount { width: 20%; text-align: right; font-variant-numeric: tabular-nums; }
.ho-more { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; }
.ho-note-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.ho-note-form textarea { flex: 1 1 260px; min-width: 0; min-height: 0; resize: vertical; font: inherit; font-size: 14px; padding: 7px 10px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); }
.ho-note-form input[type="text"] { width: 96px; font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface-2); color: var(--text); }
.ho-note-form textarea:focus, .ho-note-form input[type="text"]:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }
.ho-note-form .check { gap: 6px; font-size: 14px; }
.ho-page .pms-notes li { padding: 6px 0; font-size: 14px; }
@media (max-width: 1100px) { .ho-kpis { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .ho-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
    .ho-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ho-table .ho-units { display: none; }
    .ho-table .ho-guest { width: 55%; }
    .ho-note-form textarea { flex-basis: 100%; }
}
@media print {
    .container.ho-page { max-width: none; padding: 0; }
    .ho-kpis { grid-auto-flow: column; grid-template-columns: none; gap: 6px; }
    .ho-kpis .card { padding: 6px 8px; }
    .ho-kpis b { font-size: 13pt; }
    .ho-grid { grid-template-columns: minmax(0, 1fr); }
    .ho-table { font-size: 9.5pt; }
    .ho-table td { padding: 2px 6px; }
    .ho-table tr { break-inside: avoid; }
    .ho-more { display: none; }
}

/* mobile fixes 13.11 ==========================================================
   Telefonda (≤760px) amallar qatori (.m-actions — bron kartasi, shaxmatka, dashboard, guruh, kassa…):
   asosiy tugma — butun qator; qolganlari — teng kataklar to'ri, sig'masa keyingi qatorga o'tadi;
   uzun yozuv tugma ichida ikki qatorga bo'linadi — hech qachon qo'shni tugma ustiga chiqmaydi. */
@media (max-width: 760px) {
    .m-actions { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr)); gap: 8px; align-items: stretch; }
    .m-actions form { display: contents; }
    .m-actions > *, .m-actions > form > * { min-width: 0; margin: 0 !important; }
    .m-actions > .btn, .m-actions > form > .btn, .m-actions > .action-more > summary.btn {
        width: 100%; min-width: 0; min-height: 44px; flex: none !important; box-sizing: border-box; padding: 8px 10px;
        white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; text-align: center; line-height: 1.2; }
    .m-actions > .btn .ic, .m-actions > form > .btn .ic, .m-actions > .action-more > summary .ic { display: inline-block !important; flex: none; }
    .m-actions > .bk-main, .m-actions > form > .bk-main { grid-column: 1 / -1; }
    /* tugma bo'lmagan bo'laklar (oy tanlash, «Менинг / Ҳаммаси», «Барибир» belgisi…) — alohida butun qator */
    .m-actions > :not(.btn):not(.action-more):not(form), .m-actions > form > :not(.btn) { grid-column: 1 / -1; }
    .m-actions > .ow-month, .m-actions > .hk-seg { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
    .m-actions > .hk-seg > .btn { flex: 1 1 0; min-width: 0; white-space: normal; }
    .m-actions > .action-more { position: relative; margin: 0; }
    .m-actions .action-menu { left: auto; right: 0; max-width: calc(100vw - 24px); }
}
/* Telefonda bitta uzun tugma (masalan, «Тўловларни солиштириш (Payme, Click, терминал)») kartadan chiqib ketmasin —
   yozuv tugma ichida qatorga bo'linadi; jadval ichidagi tugmalar — avvalgidek bir qatorda (jadval o'zi suriladi). */
@media (max-width: 640px) {
    .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }
    td .btn, th .btn, .table-wrap .btn { white-space: nowrap; overflow-wrap: normal; }
    .page-head > * { min-width: 0; max-width: 100%; }
    .page-head h1 { overflow-wrap: anywhere; }
}
/* Oyna (bron kartasi bo'limlari, «Telegram» va b.) ichidagi jadval telefonda oynani kengaytirmasin — jadval o'zi suriladi;
   qator-maydonlar (.inline-fields) sig'masa keyingi qatorga o'tadi; QR skaner videosi oynaga sig'adi. */
@media (max-width: 760px) {
    .modal table:not(.table-wrap table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .modal > *, .modal form > * { min-width: 0; }
    .inline-fields { flex-wrap: wrap; }
    .modal video, .modal canvas, .modal img { max-width: 100%; height: auto; }
}
.hk-scan-dlg video { display: block; width: auto; max-width: calc(100% - 24px); margin: 8px 12px; box-sizing: border-box; }
/* Amallar qatorida (.m-actions) «+» qo'shish tugmasi telefonda ham yozuvi bilan — katak kengligida (yolg'iz belgi katakda adashadi). */
@media (max-width: 640px) {
    .m-actions > .btn.btn-add:not(.bk-main), .m-actions > form > .btn.btn-add:not(.bk-main) { width: 100%; height: auto; min-height: 44px; padding: 8px 10px; gap: 6px; }
    .m-actions > .btn.btn-add:not(.bk-main) > .btn-add-txt, .m-actions > form > .btn.btn-add:not(.bk-main) > .btn-add-txt {
        position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
}

/* Хона телевизорлари: кутаётган TV'лар (бир босишда улаш), масофадан бошқарув. */
.tv-wait { border: 2px dashed var(--accent, #3ba7e6); }
.tv-wait-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.tv-wait-row:last-child { border-bottom: 0; }
.tv-wait-code { font-size: 22px; font-weight: 800; letter-spacing: 3px; font-variant-numeric: tabular-nums; min-width: 110px; }
.tv-wait-info { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.tv-wait-info small { color: var(--muted); font-size: 13px; }
.tv-wait-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.tv-wait-form select { min-width: 180px; max-width: 100%; }
.tv-remote { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.tv-remote form { margin: 0; }
.tv-remote .btn { width: 100%; }
.tv-remote-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0 0 12px; }
.tv-remote-row .field { margin: 0; flex: 1; min-width: 120px; }
@media (max-width: 640px) { .tv-wait-form { width: 100%; } .tv-wait-form select { flex: 1; min-width: 0; } }

/* ===== «Операциялар»: ikki panelli menyu (14.11) — chapda bo'limlar (paketlar), o'ngda tanlangan bo'lim buyruqlari =====
   Bo'lim tugmasi va uning paneli ketma-ket (telefonda — akkordeon); kompyuterda panel o'ng ustunda barcha qatorlarni egallaydi,
   oxirgi «1fr» qator — panel uzun bo'lsa, bo'limlar orasi kengaymasin. --ops-n / --ops-span — shablonda (bo'limlar soni). */
.nav-menu.mega-menu.ops-menu {
    display: block; max-width: 920px; width: calc(100vw - 32px); margin: 0; right: auto; padding: 10px;
}
.ops-menu .ops-context { margin-bottom: 8px; }
.ops-panes {
    display: grid; grid-template-columns: minmax(210px, 270px) minmax(0, 1fr); column-gap: 14px;
    grid-template-rows: repeat(var(--ops-n, 1), auto) 1fr; align-items: start;
}
.ops-group {
    grid-column: 1; display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; margin: 0 0 2px; padding: 8px 10px;
    border: 0; border-radius: 10px; background: none; color: var(--text); font: 600 14px/1.3 inherit; font-family: inherit; text-align: left; cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}
.ops-group:hover { background: var(--surface-2); }
.ops-group.on { background: var(--primary-soft); color: var(--primary); }
.ops-group:focus-visible, .ops-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ops-ico { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 8px;
    background: var(--surface-2); color: var(--primary); }
.ops-group.on .ops-ico { background: var(--surface); }
.ops-ico .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ops-gname { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ops-count { flex: none; min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
    font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.ops-group.on .ops-count { background: var(--surface); color: var(--primary); }
.ops-alert { flex: none; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--danger, #dc2626); color: #fff;
    font-size: 11.5px; font-weight: 800; text-align: center; }
.ops-chev { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .55;
    transition: transform var(--t-fast); }
.ops-pane {
    grid-column: 2; grid-row: 1 / span var(--ops-span, 2); min-width: 0; align-self: stretch;
    /* Buyruqlar avval BITTA ustunga (yuqoridan pastga); bo'limlar ro'yxati balandligiga sig'masa — ikkinchi ustunga o'tadi (egasi 14.11). */
    display: block; column-count: 2; column-width: 240px; column-fill: auto; column-gap: 10px;
    padding: 6px 4px 6px 14px; border-left: 1px solid var(--border);
}
.ops-pane > .ops-item { break-inside: avoid; }
.ops-pane[hidden] { display: none; }
.ops-pane-head { grid-column: 1 / -1; column-span: all; padding: 4px 10px 6px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nav-menu .ops-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; min-width: 0; }
.nav-menu .ops-item:hover { background: var(--surface-2); }
.nav-menu .ops-item > .ops-item-title { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.ops-cico { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--primary); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.nav-menu .ops-item > .tip { display: inline-grid; place-items: center; flex: none; margin-left: auto; }
.nav-menu .ops-item > small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-badge { flex: none; padding: 0 7px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 800; line-height: 1.6; }

/* Telefon va planshet (gamburger menyu, ≤960px): akkordeon — bo'lim bosilsa buyruqlari shu joyda, to'liq kenglikda. */
@media (max-width: 960px) {
    .topbar .nav-menu.mega-menu.ops-menu { width: auto; max-width: none; padding: 6px 6px 6px 10px; }
    .topbar .nav-group.open .nav-menu.ops-menu { display: block; }
    .ops-panes { display: block; }
    .ops-group { padding: 10px 8px; }
    .ops-group[aria-expanded="true"] .ops-chev { transform: rotate(90deg); }
    .ops-group.on:not([aria-expanded="true"]) { background: none; color: var(--text); }
    .ops-group.on:not([aria-expanded="true"]) .ops-ico { background: var(--surface-2); }
    .ops-pane { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0 0 6px 18px; margin: 0 0 4px 22px; border-left: 2px solid var(--primary-soft); }
    .ops-pane-head { display: none; }
    .nav-menu .ops-item > small { white-space: normal; }
}

/* Belgili tugma izohi ekran chetida (app.js iconTip): chap chetga yaqin — chapdan ochiladi, pastda — tepaga. */
.icon-btn.tip-start[aria-label]::after { right: auto; left: 0; }
.icon-btn.tip-up[aria-label]::after { top: auto; bottom: calc(100% + 8px); }
.icon-btn[aria-label]::after { max-width: min(240px, calc(100vw - 24px)); }

/* ---------- Ro'yxat sahifasi (14.11, fragments/list.html): qidiruv + filtrlar + sahifa hajmi; saralash; sahifalar ----------
   Tepada bir qator (telefonda — qidiruv to'liq kenglikda, qolgani ostida), hech narsa ekrandan chiqmaydi. */
.list-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; min-width: 0; }
.list-bar > .lf, .list-bar .lf { display: contents; }
.list-search { position: relative; display: flex; align-items: center; flex: 1 1 240px; min-width: 0; max-width: 420px; margin: 0; }
.list-search > .ico { position: absolute; left: 11px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.list-bar input[type=search], .list-bar select, .list-bar input[type=date] {
    font: inherit; font-size: 14px; height: 36px; box-sizing: border-box; padding: 0 10px; min-width: 0; max-width: 100%;
    border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text);
}
.list-bar input[type=search] { width: 100%; padding-left: 34px; }
.list-bar select { padding-right: 26px; max-width: 220px; }
.list-bar input:focus, .list-bar select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.list-bar .check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; margin: 0; }
.list-size { margin: 0 0 0 auto; display: inline-flex; }
.list-size select { width: auto; min-width: 64px; }
.list-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; margin: 14px 0 6px; }
.list-count { margin-right: auto; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-count b { color: var(--text); }
.list-pages { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.list-page { min-width: 32px; height: 32px; padding: 0 8px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid transparent; color: var(--text); text-decoration: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.list-page:hover, .list-page:focus-visible { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); outline: none; }
.list-page.on { background: var(--primary-grad); color: #fff; font-weight: 700; }
.list-gap { color: var(--muted); padding: 0 2px; }
.list-pager span.btn-act[aria-disabled="true"] { opacity: .4; cursor: default; }
.list-pager .btn-act svg, .list-bar .btn-act svg { width: 16px; height: 16px; }
.list-bar .btn-act { width: 36px; height: 36px; }
/* «Саҳифа [ N ] / M» — raqam yozib Enter (list :: pager) */
.list-jump { display: inline-flex; align-items: center; gap: 6px; margin: 0 2px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.list-jump label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font: inherit; color: inherit; }
.list-jump input[type=number] { width: 4.2em; height: 32px; padding: 0 6px; box-sizing: border-box; text-align: center; font: inherit; font-size: 14px;
    font-variant-numeric: tabular-nums; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; -moz-appearance: textfield; }
.list-jump input[type=number]::-webkit-outer-spin-button, .list-jump input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.list-jump input[type=number]:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.list-jump-of { font-variant-numeric: tabular-nums; }
/* Pastki qator: sahifalar + hajm (list :: sizer) */
.list-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.list-foot > .list-pager { flex: 1 1 auto; margin: 10px 0 4px; }
.list-sizer { margin: 0; display: inline-flex; }
.list-sizer select { font: inherit; font-size: 14px; height: 32px; padding: 0 24px 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
/* Brauzerdagi filtr (data-filter-input): yashirilgan qatorlar (yashirin qatorlar) */
tr[data-filter-hidden] { display: none; }
@media (max-width: 640px) {
    .list-search { flex-basis: 100%; max-width: none; }
    .list-size { margin-left: 0; }
    /* telefonda — faqat ‹ N / M › (egasi 15.11) */
    .list-pager[data-pager] .list-count, .list-pager .list-pages, .list-pager .list-edge, .list-jump-word { display: none; }
    .list-count { flex-basis: 100%; text-align: center; margin: 0 0 4px; }
}
@media print {
    .list-bar, .list-sizer, .list-pager .btn-act, .list-pages, .list-jump { display: none !important; }
    .sort-link .sort-arrow { display: none; }
}
/* Роллар ва рухсатлар: «Рухсат» устуни чапда қотирилган ва тор (экраннинг кўп қисмини эгалламайди),
   лавозим устунлари ён томонга айланади. Кичик экранда ҳам рухсат устуни экранни тўлдирмайди (egasi 14.11). */
.roles-table { border-collapse: separate; border-spacing: 0; }
.roles-table th:first-child, .roles-table tbody tr:not(.roles-group) td:first-child {
    position: sticky; left: 0; z-index: 2; background: var(--surface);
    width: clamp(130px, 24vw, 240px); min-width: clamp(130px, 24vw, 240px); max-width: clamp(130px, 24vw, 240px);
    white-space: normal; overflow-wrap: anywhere; box-shadow: 1px 0 0 var(--border);
}
.roles-table tbody tr:not(.roles-group):hover td:first-child { background: var(--primary-soft); }
.roles-table th.role-col, .roles-table td.role-col { min-width: 84px; width: 96px; padding-left: 6px; padding-right: 6px; }
.roles-table .roles-group td { padding: 0; }
.roles-table .roles-sticky { position: sticky; left: 0; display: inline-block; padding: 10px 12px; }
@media (max-width: 600px) {
    .roles-table th:first-child, .roles-table tbody tr:not(.roles-group) td:first-child { width: 42vw; min-width: 42vw; max-width: 42vw; font-size: 13px; }
    .roles-table th.role-col, .roles-table td.role-col { min-width: 72px; width: 72px; }
}

/* Barcha yuqori menyular (Молия, Жамоа, Платформа, Ҳисоботлар pastki havolalari): tavsif «i» ichida — doira markazda (egasi 14.11). */
.nav-menu a > .tip { display: inline-grid; place-items: center; }
.nav-menu .mega-foot a { display: inline-flex; align-items: center; gap: 4px; }

/* «Фақат кўриш» фойдаланувчиси (egasi 14.11): ўзгартириш тугмалари кўринмайди (сервер барибир рад этади — ViewOnlyUserFilter). */
/* Shaxsiy ekran sozlamasi (PersonalLayout) — [data-readonly-allow] ichidagi tugmalar ko'rinadi: «Фақат кўради» ham o'z dashboardini sozlaydi. */
html[data-readonly] .btn-add:not(:where([data-readonly-allow], [data-readonly-allow] *)), html[data-readonly] .btn-act-del:not(:where([data-readonly-allow], [data-readonly-allow] *)),
html[data-readonly] .btn-act-save:not(:where([data-readonly-allow], [data-readonly-allow] *)), html[data-readonly] .btn-act:not(:where([data-readonly-allow], [data-readonly-allow] *)),
html[data-readonly] form[method="post"]:not([data-readonly-allow]) button[type="submit"],
html[data-readonly] form[method="post"]:not([data-readonly-allow]) input[type="submit"] { display: none !important; }
.view-only-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 11.5px; }
.view-only-badge .ico { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Икки панелли меню бандлари: узун ном қаторга ўралади, «i» ҳеч қачон ёзув устига тушмайди (egasi 14.11). */
.nav-menu .ops-item, .topbar .nav-menu a.ops-item { white-space: normal; }
.nav-menu .ops-item > .ops-item-title, .nav-menu .ops-item > .ops-item-title > span { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.nav-menu .ops-item > .tip { margin-left: 8px; }
/* Бўлим командалари: 10 тагача — битта кенг устун; кўп бўлса — икки устун (egasi 14.11: аввал битта устун). */
.ops-pane { column-count: 1; }
.ops-pane.two-col { column-count: 2; }

/* Икки панелли меню ўлчами (egasi 14.11): ўнгда гуруҳ номи йўқ; командалар чапдаги гуруҳлар баландлигига сиғса — битта устун
   ва ойна шу энгача торайади; сиғмаса — икки устун ва ойна кенгаяди (app.js --rows ни ҳисоблайди). */
@media (min-width: 961px) {
    .nav-menu.mega-menu.ops-menu { width: max-content; max-width: calc(100vw - 32px); }
    .ops-panes { grid-template-columns: minmax(200px, 250px) max-content; }
    .ops-pane-head { display: none; }
    .ops-pane, .ops-pane.two-col {
        display: grid; column-count: auto; grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 12), auto);
        grid-auto-columns: minmax(200px, 280px); align-content: start; gap: 0 8px;
    }
    .ops-pane[hidden] { display: none; }
}

/* Платформа эгаси: мижоз меҳмонхонасида қулф/қалам тугмаси, «Таҳрирлаш режими» сариқ қатори ва тасдиқ ойнаси (OwnerGuard). */
.owner-edit-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; cursor: pointer;
    border: 1px solid #d4a72c; background: #fff8db; color: #7a5a00; font: inherit; font-size: 13px; font-weight: 600; }
.owner-edit-btn:hover { background: #ffefb0; }
.owner-edit-btn .ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.owner-edit-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
    background: #fde68a !important; color: #5c4400 !important; border-bottom: 1px solid #e0b93a; }
.owner-edit-bar .ico { width: 15px; height: 15px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.owner-edit-bar form { margin: 0; }
.owner-edit-dlg h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.owner-edit-dlg h3 .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.owner-edit-dlg .field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.owner-edit-dlg .form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) { .owner-edit-txt { display: none; } }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .owner-edit-btn { background: #3d3205; color: #fde68a; border-color: #8a6d12; }
    :root:not([data-theme="light"]) .owner-edit-bar { background: #4a3b06 !important; color: #fde68a !important; border-color: #8a6d12; }
}
:root[data-theme="dark"] .owner-edit-btn { background: #3d3205; color: #fde68a; border-color: #8a6d12; }
:root[data-theme="dark"] .owner-edit-bar { background: #4a3b06 !important; color: #fde68a !important; border-color: #8a6d12; }
/* «☰» — Молия, Жамоа, Созламалар, Платформа битта менюда (egasi 15.11): юқори қатор бир қаторда қолади. */
.nav-more-toggle { padding-left: 10px; padding-right: 10px; }
.nav-more-toggle .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-menu.mega-menu.more-menu { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); width: min(1100px, calc(100vw - 32px)); gap: 4px 18px; align-items: start; }
.more-menu .more-sec { min-width: 0; }
.more-menu .mega-head { margin: 4px 10px 6px; }
@media (max-width: 960px) {
    .nav-more-toggle .ico { display: none; }
    .nav-more-toggle::before { content: attr(aria-label); }
    .topbar .nav-menu.mega-menu.more-menu { width: auto; grid-template-columns: 1fr; }
}

/* Синов/лицензия ёзуви: «×» билан яширилади (egasi 15.11). */
.license-banner { display: flex; align-items: center; justify-content: center; gap: 10px; }
.license-banner[hidden] { display: none; }
.license-hide { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; opacity: .75; }
.license-hide:hover { opacity: 1; background: rgba(0, 0, 0, .08); }
.license-hide .ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Ўчирилганлар: «30 кунда ўзи ўчади» алмаштиргичи (egasi 15.11). */
.purge-switch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.purge-switch .purge-ico { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.purge-switch .purge-label { font-weight: 600; font-size: 14px; }
.purge-switch .purge-state { font-size: 13px; color: var(--muted); min-width: 34px; }

/* Юқори қатор бир қаторда (egasi 15.11): менюлар жойида; Созламалар ва Платформа — белги (ёзув телефонда); ўнгдаги белгилар ихчам. */
.nav-ico-toggle .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 961px) {
    .nav-ico-toggle { padding-left: 10px; padding-right: 8px; gap: 2px; }
    .nav-ico-toggle .nav-ico-label { display: none; }
    .topbar { flex-wrap: nowrap; }
    .topbar .user-box { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; flex: none; }
    .topbar .user-box > * { flex: none; }
    .topbar .ws-switch > summary, .topbar .ws-switch { max-width: 230px; }
    .topbar .ws-switch > summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 961px) and (max-width: 1500px) {
    .topbar .ws-switch > summary, .topbar .ws-switch { max-width: 170px; }
}
@media (max-width: 960px) {
    .nav-ico-toggle .ico { display: none; }
}

/* «☰» юқори менюси: Справка, Ёрдамчи, алоқа, мавзу, тил (egasi 15.11). */
.tools-menu { position: relative; }
.tools-menu > summary { list-style: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.tools-menu > summary::-webkit-details-marker { display: none; }
.tools-menu > summary .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tools-menu[open] > summary { border-color: var(--primary); color: var(--primary); }
.tools-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 210px;
    padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.tools-pop > * { margin: 0 !important; }
.tools-pop .help-btn { justify-content: flex-start; width: 100%; }
.tools-pop .help-btn span { display: inline !important; }
.tools-pop > .rv-sync .rv-sync-btn, .tools-pop > .theme-toggle { display: flex !important; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: auto !important; padding: 8px 10px !important; border-radius: 9px; }
.tools-pop .tools-label { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; }
.tools-pop > .lang-menu { align-self: flex-start; }
.tools-pop > .rv-sync { width: 100%; }
/* «Ўзимники» калити (Платформа → Меҳмонхоналар): жадвал қаторида ихчам. */
.own-switch { margin: 0; display: inline-flex; align-items: center; }
/* Синхронлаш белгиси фақат иш бўлганда: навбатда амал (сариқ) ёки хато (қизил). Ҳаммаси сақланган бўлса — яширин. */
.rv-sync.rv-sync-ok { display: none !important; }

/* ---------- Profil rasmi (15.11): rasm bo'lsa — <img>, bo'lmasa bosh harf; tahrirlash oynasi (fragments/avatar, js/avatar.js) ---------- */
.avatar { overflow: hidden; }
.avatar.has-img { background: var(--surface-2); }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-sm { width: 30px; height: 30px; font-size: 13px; }
.avatar-xl { width: 140px; height: 140px; font-size: 56px; }
.ava-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
h1.ava-name { gap: 14px; }
.ava-edit { position: relative; display: inline-flex; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; flex: none; }
.ava-edit:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.ava-edit .avatar-lg { width: 64px; height: 64px; font-size: 26px; transition: filter .15s; }
.ava-edit:hover .avatar { filter: brightness(.92); }
.ava-cam { position: absolute; right: -3px; bottom: -3px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface); color: var(--primary); border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(15, 23, 42, .18); }
.ava-cam svg, .ava-pick svg, .ava-zoom svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ava-card { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.ava-card .hint { margin: 4px 0 0; }
.ava-modal { width: min(420px, calc(100vw - 32px)); }
.ava-stage { position: relative; width: min(300px, 100%); aspect-ratio: 1; margin: 4px auto 12px; border-radius: 16px; overflow: hidden;
    background: var(--surface-2); touch-action: none; user-select: none; -webkit-user-select: none; display: grid; place-items: center; }
.ava-stage:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.ava-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.ava-stage canvas:active { cursor: grabbing; }
.ava-stage canvas[hidden] { display: none; }
/* Doira — profil rasmi qanday ko'rinishi (saqlanadigani — butun kvadrat). */
.ava-ring { position: absolute; inset: 0; pointer-events: none; }
.ava-stage canvas:not([hidden]) ~ .ava-ring { background: radial-gradient(circle at center, transparent 0 calc(50% - 1.5px), rgba(255, 255, 255, .9) calc(50% - 1.5px) 50%, rgba(15, 23, 42, .4) 50%); }
.ava-now[hidden] { display: none; }
.ava-zoom { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 0 auto 8px; width: min(300px, 100%); }
.ava-zoom[hidden] { display: none; }
.ava-zoom input { flex: 1; min-width: 0; accent-color: var(--primary); }
.ava-hint { text-align: center; margin: 0 0 10px; }
.ava-pick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.ava-pick .btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ava-form .form-actions { margin-top: 8px; }
.ava-del { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); text-align: center; }
.ava-del-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); }
.ava-del-btn .ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Kompyuterda (sichqoncha) «Суратга олиш» — oddiy tanlash bilan bir xil, ko'rsatilmaydi. */
@media (hover: hover) and (pointer: fine) { .ava-camera-btn { display: none !important; } }
@media (max-width: 480px) {
    .ava-card { align-items: flex-start; }
    .avatar-xl { width: 112px; height: 112px; font-size: 44px; }
}

/* Фойдаланувчилар: бир нечта меҳмонхона — доира ичида сони, устига борилса рўйхат (egasi 15.11). */
.hotel-count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--primary-soft);
    color: var(--primary); font-weight: 700; font-size: 13px; cursor: help; font-variant-numeric: tabular-nums; }
/* Оддий тугма ичидаги белги (масалан «Рухсатлар» калити): чизиқли, тўлдирилмаган. */
.btn > svg.ico, .btn-sm > svg.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
/* Profil rasmi — «Жойлаштириш» (15.11): surish aniq ko'rinsin — move kursori, belgi bilan izoh. */
.ava-stage canvas { cursor: move; }
.ava-stage.dragging canvas { cursor: grabbing; }
.ava-hint .hint { margin: 2px 0 0; }
.ava-hint-main { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; color: var(--text); }
.ava-hint-main svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ava-pick button.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Birlashtirilgan hisobotlar (15.11): ko'rinish almashtirgichi, «Батафсил», ma'lumot manbai; tepada grafik. */
.report-views { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 8px; }
.report-views .report-view-tabs a { font-weight: 600; }
.report-view-source { white-space: normal; }
.report-chart .chart-box { min-height: 260px; }
.report-full .abc-class { font-weight: 700; text-align: center; }
.ws-card-more { margin: 10px 0 0; text-align: right; }
@media (max-width: 720px) {
    .report-views .report-view-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); width: 100%; }
    .report-views .report-view-tabs a { text-align: center; white-space: normal; padding: 8px 4px; }
    .report-views .report-view-detail { width: 100%; justify-content: center; }
}
@media print {
    .report-views .report-view-tabs, .report-view-detail, .ws-card-more { display: none !important; }
    .report-chart { break-inside: avoid; }
    .report-chart .chart-box { min-height: 0; height: 220px; }
}
/* ---- Бошқарув → меҳмонхона: «Модуллар ва командалар» дарахти (egasi 15.11) ---- */
.feat-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 12px; }
.feat-search { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 0; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.feat-search .ico { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.feat-search input { border: 0; background: transparent; padding: 10px 0; width: 100%; min-width: 0; box-shadow: none; }
.feat-nopms { display: flex; gap: 8px; align-items: flex-start; }
.feat-nopms .ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.feat-list { display: flex; flex-direction: column; gap: 8px; }
.feat-mod { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.feat-mod.is-on { border-color: var(--success); }
.feat-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
.feat-mod-row { background: var(--surface); }
.feat-toggle { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.feat-toggle .chev { width: 16px; height: 16px; flex-shrink: 0; transition: transform var(--t) var(--ease); }
.feat-mod.is-open .feat-toggle .chev { transform: rotate(90deg); }
.feat-ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--primary); }
.feat-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1 1 200px; min-width: 0; }
.feat-ctl { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.feat-ctl > .ico { width: 18px; height: 18px; color: var(--success); }
.feat-until { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.feat-until input[type=date] { width: 150px; padding: 6px 8px; font-size: 13px; }
.feat-until-txt { white-space: nowrap; }
.feat-cmds { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.feat-cmd { border-top: 1px solid var(--border); padding-left: 36px; }
.feat-cmd:first-child { border-top: 0; }
.feat-cmd.is-blocked { opacity: .6; }
.feat-cmd .feat-ico { width: 18px; height: 18px; color: var(--muted); }
.feat-log { margin-top: 14px; }
.feat-log ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.feat-empty { margin: 8px 0; }
.imported-banner { display: flex; gap: 8px; align-items: flex-start; }
.imported-banner .ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
label.cmd-off { opacity: .55; }

/* ---- Ikki panelli ko'chirgich (fragments/dualpane, app.js [data-dp]) — umumiy komponent ---- */
.dp-panes { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.dp-pane { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.dp-head { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.dp-head select, .dp-head input { width: 100%; padding: 8px 12px; }
.dp-head select:focus, .dp-head input:focus, .dp-mobile select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.dp-list { list-style: none; margin: 0; padding: 4px; height: 420px; overflow-y: auto; outline: none; }
.dp-list:focus-visible { box-shadow: var(--ring); }
.dp-list.is-drop { background: var(--primary-soft); }
.dp-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 10px; border-radius: 8px; cursor: pointer; user-select: none; border: 1px solid transparent; }
.dp-item:hover { background: var(--surface); }
.dp-item.is-sel { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.dp-list:focus .dp-item.is-cur { border-color: var(--primary); }
.dp-item.is-locked { opacity: .6; cursor: not-allowed; }
.dp-item .ico { width: 14px; height: 14px; }
.dp-foot { margin: 0; padding: 6px 10px; font-size: 12px; border-top: 1px solid var(--border); }
.dp-mid { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.dp-mobile { display: none; gap: 8px; margin-top: 10px; }
.dp-keys { margin-top: 8px; }
.mm-actions { flex-wrap: wrap; gap: 8px; }
.mm-actions form { margin: 0; }
@media (max-width: 767px) {
    .dp-panes { grid-template-columns: minmax(0, 1fr); }
    .dp-pane[data-dp-pane="right"], .dp-mid, .dp-keys { display: none; }
    .dp-mobile { display: flex; }
    .dp-mobile select { flex: 1 1 auto; min-width: 0; }
    .dp-list { height: 360px; }
}
@media (max-width: 600px) {
    .feat-cmd { padding-left: 12px; }
    .feat-ctl { width: 100%; justify-content: flex-end; }
    .feat-until input[type=date] { width: 136px; }
}
/* Sarlavha (egasi 15.11): «Шу меҳмонхонада таҳрирлаш» — faqat belgilar (matn title va aria-label’da), bir qatorga sig'sin. */
.owner-edit-txt { display: none; }
/* Ходим кўрадиган меню — ikki ustun: menyu nomi | komandalar (egasi 15.11). */
.mprev { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 14px; margin-top: 10px; }
.mprev-menus { display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--border); padding-right: 10px; }
.mprev-tab { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; padding: 8px 10px; border-radius: 8px;
    border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.mprev-tab:hover { background: var(--surface); }
.mprev-tab.is-on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.mprev-n { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .8em; text-align: center; }
.mprev-cmds .dept-chips { align-content: flex-start; }
@media (max-width: 600px) {
    .mprev { grid-template-columns: 1fr; }
    .mprev-menus { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 8px; }
    .mprev-tab { white-space: nowrap; }
}
.dp-empty { padding: 18px 10px; text-align: center; font-size: .9em; list-style: none; }
/* Qulf — 🔒 (egasi 15.11). */
.ico-lock { display: inline-block; font-size: .95em; line-height: 1; vertical-align: -1px; flex: none; }
/* Amallar menyusi (⋯): har band — belgi + matn, izoh title'da (egasi 15.11). */
.action-menu .menu-item { display: flex; align-items: center; gap: 10px; }
.action-menu .menu-item > svg.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.row-acts { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.btn-act > svg.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Ixcham sozlama kartochkalari (Бошқарув → Меҳмонхоналар pastida, egasi 15.11): ko'p ustun, nom — tepada, qiymat + saqlash — bir qatorda. */
.mini-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 16px; }
.mini-sets .mini-set { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 10px; padding: 14px 16px; margin: 0; }
.mini-set h3 { grid-column: 1 / -1; margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.mini-set label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); min-width: 0; }
.mini-set input[type=number] { font: inherit; width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); color: var(--text); }
.mini-set input[type=number]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.mini-set .btn-act-save { width: 38px; height: 38px; }
/* Ochiq «⋯» / ochiladigan menyu keyingi kartochka tagida qolmasin (egasi 15.11: «tagiga kirib qolgan»): «reveal» animatsiyasi har
   kartochkani alohida qatlam qiladi — ichida ochiq menyu bor kartochka yuqoriga ko'tariladi. */
:is(.reveal, .stagger > *, .card):has(details[open]) { position: relative; z-index: 40; }   /* menyudan (topbar — 50) past: ochiq oyna menyu va uning ro'yxatlari ustiga chiqmasin (egasi 16.11) */
/* Ресепшн сарлавҳаси — ихчам (egasi 15.11: «tepani height'ini kichraytirish»): katta ekranda bitta qator —
   ← mehmonxona · avatar + «Ресепшн» + «Кечаси бўш» / «Бандлик» · «Бугун» tugmalari · amallar. Avatar kichik (egasi: yashirilmasin). */
@media (min-width: 1100px) {
    .pms-desk .bk-hero.desk-hero { padding: 8px 14px; column-gap: 12px; row-gap: 8px; margin-bottom: 10px; }
    .pms-desk .desk-hero-top { display: contents; }
    .pms-desk .desk-hero-top > .back-link { order: 1; font-size: 13px; white-space: nowrap; }
    .pms-desk .desk-hero .bk-hero-main { order: 2; gap: 10px; }
    .pms-desk .desk-hero .bk-avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }
    .pms-desk .desk-hero .bk-avatar .ic { width: 17px; height: 17px; }
    .pms-desk .desk-hero .bk-hero-text { display: flex; align-items: center; gap: 10px; }
    .pms-desk .desk-hero h1 { font-size: 19px; white-space: nowrap; }
    .pms-desk .desk-hero .desk-chips { flex-wrap: nowrap; gap: 6px; }
    .pms-desk .desk-hero-top .pms-side { order: 3; margin: 0 0 0 auto; flex-wrap: nowrap; gap: 6px; }
    .pms-desk .desk-hero-top .pms-side-head { display: none; }
    .pms-desk .desk-hero-top .pms-side-body { flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
    .pms-desk .desk-hero-top .pms-side .pms-fold > summary { padding: 4px 10px 4px 8px; font-size: 13px; gap: 5px; }
    .pms-desk .desk-hero-top .pms-side .pms-fold > summary .muted { min-width: 20px; padding: 0 6px; font-size: 12px; }
    .pms-desk .desk-hero .desk-actions { order: 4; gap: 6px; flex-wrap: nowrap; }
    .pms-desk .desk-hero .desk-actions .btn { padding: 5px 12px; min-height: 34px; font-size: 13.5px; }
/* Amallar — faqat belgi (nomi — title / aria-label), bitta qatorga sig'sin. */
    .pms-desk .desk-hero .desk-actions { padding: 0; border: 0; background: none; box-shadow: none; }
    .pms-desk .desk-hero .desk-actions > .btn:not(.bk-main) { font-size: 0; gap: 0; padding: 0; width: 36px; min-height: 36px; justify-content: center; }
    .pms-desk .desk-hero .desk-actions > .btn:not(.bk-main) .ic { width: 18px; height: 18px; }
    .pms-desk .desk-hero .desk-actions .action-more > summary { padding: 0; width: 36px; min-height: 36px; justify-content: center; }
    .pms-desk .desk-hero-top .pms-side .pms-fold > summary { padding: 4px 8px 4px 6px; font-size: 12.5px; gap: 4px; }
    .pms-desk .desk-hero-top .pms-side-body { gap: 5px; }
    .pms-desk .bk-hero.desk-hero { column-gap: 10px; justify-content: flex-start; }
}
/* Juda keng ekranda «Бугун» tugmalari ham bitta qatorda qoladi. */
@media (min-width: 1600px) {
    .pms-desk .desk-hero-top .pms-side-body { flex-wrap: nowrap; }
}
/* Ресепшн: amallar «Хоналар ҳозир» chizig'ida (desk.html skripti ko'chiradi) — ixcham belgi tugmalar, ⋯ menyusi o'ngga ochiladi. */
.rs-meta .desk-actions.in-strip { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 0 0; padding: 0; border: 0; background: none; box-shadow: none; flex-wrap: nowrap; }
.rs-meta .desk-actions.in-strip > .btn:not(.bk-main) { font-size: 0; gap: 0; padding: 0; width: 30px; height: 30px; min-height: 30px; justify-content: center; }
.rs-meta .desk-actions.in-strip > .btn:not(.bk-main) .ic { width: 16px; height: 16px; }
.rs-meta .desk-actions.in-strip > .bk-main { padding: 3px 10px; font-size: 12.5px; min-height: 30px; }
.rs-meta .desk-actions.in-strip .action-more > summary { padding: 0; width: 30px; height: 30px; min-height: 30px; justify-content: center; }
.rs-meta .desk-actions.in-strip .action-menu { right: 0; left: auto; z-index: 60; }
.rs-strip:has(.desk-actions.in-strip) { position: relative; z-index: 5; }
/* 1С'ga bron yozish navbati: «Бекор қилиш» amali — qizil (egasi 15.11). */
.ow-cancel { color: var(--danger); font-weight: 600; }
/* «Бекор қилиш» qatori — butunlay qizil (egasi 15.11: «satr to'liq qizil»). */
tr.ow-cancel > td, tr.ow-cancel > td .muted { color: var(--danger); }
tr.ow-cancel > td:first-child { font-weight: 600; }
.ow-cancel:not(tr) { color: var(--danger); }
/* 1С'ga bron yozish: «Янги синов брони» oynasi — har blok alohida ramkada, bir-biriga aralashmaydi (egasi 16.11). */
#owNew.modal-wide { width: min(760px, calc(100vw - 24px)); }
#owNew form { display: grid; gap: 14px; }
.ow-block { margin: 0; padding: 12px 14px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 0; }
.ow-block > legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ow-block .form-grid { margin: 0; }
/* Kafolat va oldindan to'lov — ixtiyoriy, yig'iladi (oyna uzaymasin). */
.ow-terms > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ow-terms > summary::-webkit-details-marker { display: none; }
.ow-terms > summary::before { content: "▸"; transition: transform .15s; }
.ow-terms[open] > summary::before { transform: rotate(90deg); }
.ow-terms[open] > summary { margin-bottom: 10px; }
.ow-room { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px; }
.ow-room + .ow-room { margin-top: 8px; }
.ow-room select, .ow-room input { width: 100%; min-width: 0; }
.ow-block .field[hidden] { display: none; }
.ow-why { font-size: 12px; max-width: 360px; white-space: normal; }
@media (max-width: 600px) {
    .ow-room { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .ow-room + .ow-room { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
}
.ow-room[hidden] { display: none; }
.ow-add-room { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.ow-add-room svg { width: 16px; height: 16px; }
/* Navbat jadvali ixcham — 1366'da hamma ustun sig'sin (sahifa uzaymasin, gorizontal aylantirish kerak bo'lmasin). */
.ow-page #owList th, .ow-page #owList td { padding-inline: 8px; font-size: 13px; }
.ow-page #owList td:nth-child(1), .ow-page #owList td:nth-child(5), .ow-page #owList td:nth-child(7) { white-space: nowrap; }
.ow-page #owList td:nth-child(3), .ow-page #owList td:nth-child(4) { max-width: 260px; }
.ow-page #owList .badge { cursor: help; }
/* Shaxmatka qidiruvi: Enter — topilgan bron bir lahza yorqin ramkada; topilmasa — maydon qizil (egasi 16.11). */
.pms-bar.flash { outline: 3px solid var(--warning, #f59e0b); outline-offset: 1px; z-index: 6; }
.pms-search.nohit { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
/* «Янги синов брони»: xona qatori maydonlari — loyiha uslubida (brauzer ko'rinishi qolmasin, egasi 15.11 qoidasi). */
.ow-room select, .ow-room input {
    font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); color: var(--text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.ow-room select:hover, .ow-room input:hover { border-color: var(--border-strong); }
.ow-room select:focus, .ow-room input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }
.ow-room { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.ow-free-note { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; font-size: 13px; color: var(--warning); background: var(--warning-soft); }
#owMod form { display: grid; gap: 14px; }
#owMod .field[hidden] { display: none; }
.ow-mod-who { margin: 0; padding: 0 2px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
/* Шахматка (egasi 16.11): pastga surilganda sanalar qatori va «Жами бўш» qatori tepada qotib turadi. Katta ekranda ham jadval
   ekran balandligiga sig'adi va o'zi ichida suriladi (yopishqoq sarlavha shu konteynerga nisbatan ishlaydi). */
@media (min-width: 961px) {
    .pms-desk .pms-board-scroll { max-height: calc(var(--vh, 1vh) * 100 - 96px); min-height: 360px; overflow: auto; overscroll-behavior: contain; }
}
#board > .pms-free, #board > .pms-corner-free { position: sticky; top: var(--pms-head-h, 46px); z-index: 4; background: var(--surface); }
#board > .pms-corner-free { z-index: 6; left: 0; }
#board > .pms-free { box-shadow: 0 1px 0 var(--border); }
/* Ресепшн: «Хоналар ҳозир» — o'ngdan ochiladigan yon panel (egasi 16.11), katta ekranda; sarlavhada bitta tugma. */
.pms-drawer-btn { order: 5; width: 38px; min-height: 36px; padding: 0; justify-content: center; }
.pms-drawer-btn .ic { width: 18px; height: 18px; }
.pms-drawer-btn[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.pms-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 92; width: min(340px, 92vw); display: flex; flex-direction: column;
    background: var(--surface); border-left: 1px solid var(--border); box-shadow: -14px 0 36px rgba(15, 23, 42, .22);
    transform: translateX(105%); transition: transform .2s ease; visibility: hidden; }
.pms-drawer.open { transform: none; visibility: visible; }
.pms-drawer-back { position: fixed; inset: 0; z-index: 91; background: rgba(15, 23, 42, .25); opacity: 0; pointer-events: none; transition: opacity .2s; }
.pms-drawer-back.open { opacity: 1; pointer-events: auto; }
.pms-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pms-drawer-head b { font-size: 16px; }
.pms-drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.pms-drawer .rs-strip { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 0; padding: 0; border: 0; background: none; }
.pms-drawer .rs-strip-title { display: none; }
.pms-drawer .rs-chip { justify-content: space-between; padding: 8px 12px; }
.pms-drawer .rs-sep { width: 100%; height: 1px; margin: 4px 0; background: var(--border); }
.pms-drawer .rs-meta { margin: 8px 0 0; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.pms-drawer .rs-meta .desk-actions.in-strip { margin: 0; }
.pms-drawer .action-menu { right: 0; left: auto; }
/* «🔒 1С» — integratsiya PMS belgisi menyuda (egasi 16.11: sariq qator o'rniga): bosilsa — izoh oynachasi. */
.imported-chip { position: relative; }
.imported-chip > summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 999px; cursor: pointer;
    font-size: 13px; font-weight: 700; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; white-space: nowrap; }
.imported-chip > summary::-webkit-details-marker { display: none; }
.imported-chip > summary:hover, .imported-chip[open] > summary { background: #fde68a; }
.imported-chip > summary .ico, .imported-chip > summary .ico-lock { width: 15px; height: 15px; font-size: 13px; }
.imported-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 120; width: min(320px, calc(100vw - 24px)); display: grid; gap: 6px; padding: 12px 14px;
    border-radius: 12px; background: var(--surface); color: var(--text); border: 1px solid #fcd34d; box-shadow: 0 14px 36px rgba(15, 23, 42, .2);
    font-size: 13px; line-height: 1.45; white-space: normal; }
.imported-pop b { color: #92400e; }
:root[data-theme="dark"] .imported-chip > summary { color: #fde68a; background: rgba(245, 158, 11, .16); border-color: rgba(245, 158, 11, .45); }
:root[data-theme="dark"] .imported-pop b { color: #fbbf24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .imported-chip > summary { color: #fde68a; background: rgba(245, 158, 11, .16); border-color: rgba(245, 158, 11, .45); } }
@media (max-width: 760px) {
    .imported-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
    .imported-chip > summary span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; }
}
/* 1С'ga bron yozish ro'yxati: bir bron — bir qator; holat yonida amallar tarixi (bosilganda). */
.badge.badge-bad { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.ow-state { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.ow-hist > summary { list-style: none; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; cursor: pointer;
    font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); background: var(--surface); }
.ow-hist > summary::-webkit-details-marker { display: none; }
.ow-hist > summary .ico { width: 13px; height: 13px; }
.ow-hist[open] > summary, .ow-hist > summary:hover { color: var(--primary); border-color: var(--primary); }
.ow-hist-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: min(420px, calc(100vw - 32px)); display: grid; gap: 6px; padding: 10px 12px;
    border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 14px 36px rgba(15, 23, 42, .18); }
.ow-hist-row { display: grid; grid-template-columns: 78px minmax(0, 150px) minmax(0, 1fr); gap: 8px; font-size: 12.5px; align-items: baseline; white-space: normal; color: var(--text); }
.ow-hist-row.bad b { color: var(--warning); }
.ow-cancel .ow-hist-row { color: var(--text); }
/* Шахматка (egasi 16.11: «tepa yashirilib qolgan»): katta ekranda shaxmatka bloki menyu ostida qotadi — sahifa qancha surilmasin,
   sanalar va «Жами бўш» qatorlari menyu ostida ko'rinadi; balandligi — ekran minus menyu. */
@media (min-width: 961px) {
    .pms-desk .pms-board-scroll { max-height: var(--pms-board-h, calc(var(--vh, 1vh) * 100 - var(--topbar-h, 64px) - 14px)); }
}
/* «Белгилар» (egasi 16.11): legenda va maslahatlar — tugmada; bosilganda ochiladi (shaxmatka ostida joy olmaydi). */
.pms-legends { position: relative; }
.pms-legends > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pms-legends > summary::-webkit-details-marker { display: none; }
.pms-legends > summary .ico { width: 16px; height: 16px; }
.pms-legends[open] > summary { border-color: var(--primary); color: var(--primary); }
.pms-legends-pop { position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; width: min(760px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 16px 40px rgba(15, 23, 42, .2); }
.pms-legends-pop .pms-legend { margin: 0; }
.pms-legends-pop .pms-hint { margin: 0; }
.pms-board-nav > .pms-legends .pms-legends-pop { left: auto; right: 0; }
@media (max-width: 960px) { .pms-legends { margin-top: 10px; } }
/* «🔒 1С» izohi: menyudagi «bir qator» qoidasi (nowrap) ichkariga o'tmasin — matn qutida o'raladi. */
.imported-pop, .imported-pop * { white-space: normal !important; overflow-wrap: anywhere; }
.imported-pop > span { display: block; }
/* «Тарих» (egasi 16.11): matnli tugma; oyna — o'z rangida (qizil qatordan meros olmaydi), uzun bo'lsa ichida suriladi. */
.ow-hist > summary { padding: 2px 9px; font-size: 12px; gap: 5px; }
.ow-hist > summary b { min-width: 16px; padding: 0 5px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 11.5px; text-align: center; }
.ow-hist-pop { max-height: 340px; overflow-y: auto; width: min(460px, calc(100vw - 32px)); }
.ow-cancel .ow-hist-pop, .ow-cancel .ow-hist-pop * { color: var(--text); }
.ow-cancel .ow-hist-pop .muted { color: var(--muted); }
.ow-hist-row { padding: 6px 0; border-top: 1px solid var(--border); }
.ow-hist-row:first-child { border-top: 0; padding-top: 0; }
#owSet form { display: grid; gap: 14px; }
#owSet .ow-block { display: grid; gap: 10px; }
/* Joylashish bo'yicha narx jadvali */
#occModal.modal-wide { width: min(960px, calc(100vw - 24px)); }
/* «Жадвал ва нархлар» (egasi 03.12): narx ustuni oynaga sig'sin — surmasdan ko'rinsin. */
#scheduleModal.modal-wide { width: min(1320px, calc(100vw - 24px)); }
#scheduleModal .schedule-table input[type=date] { min-width: 0; }
.occ-table input.occ-in { width: 100px; text-align: right; }
.occ-table .occ-res { display: block; font-size: 12px; min-height: 1em; }

/* Промокодлар (20.11) */
.promo-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; font-size: 15px; }
.muted.small, .small.muted { font-size: 12px; margin-top: 2px; }

/* «Хавфли амаллар» (21.11): yopiq turadi, ochish uchun bosiladi */
details.danger-zone > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; }
details.danger-zone > summary::-webkit-details-marker { display: none; }
details.danger-zone > summary::after { content: "▸"; margin-left: auto; color: var(--muted); transition: transform .15s; }
details.danger-zone[open] > summary::after { transform: rotate(90deg); }
details.danger-zone[open] > summary { margin-bottom: 12px; }
.danger-note { margin: 0 0 6px; font-weight: 600; color: var(--danger); }
details.danger-zone .danger-list { flex-direction: column; }

/* Mehmonxonani sozlash usuli: qo'lda / Excel shablon / nusxa (23.11) */
.setup-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; align-items: start; }
.setup-option { display: flex; flex-direction: column; gap: 6px; }
.setup-option-main { border-color: var(--primary, #1E88E5); box-shadow: 0 0 0 1px var(--primary, #1E88E5), var(--shadow); }
.setup-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2, rgba(30, 136, 229, .08)); color: var(--primary, #1E88E5); }
.setup-ico .ico { width: 24px; height: 24px; }
.setup-errors { margin: 0; padding-left: 20px; display: grid; gap: 4px; max-height: 420px; overflow-y: auto; }
/* Shablon farqi (26.11): mavjud mehmonxonaga yuklashdan oldin — nima qo'shiladi / o'zgaradi */
.setup-diff { border-top: 1px solid var(--border); padding: 10px 0; }
.setup-diff summary { cursor: pointer; }
.setup-diff > ul { margin: 8px 0 0; padding-left: 4px; list-style: none; display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.setup-diff ul ul { margin: 2px 0 0; padding-left: 22px; list-style: disc; overflow-wrap: anywhere; }
.setup-diff-new { color: var(--success, #15803d); font-weight: 600; }
@media (max-width: 1000px) { .setup-choice { grid-template-columns: minmax(0, 1fr); } }

/* E-mehmon sahifasi (23.11): o'rgatilgan qadamlar jadvali — maydon tanlovi bir qatorda */
.em-script + .em-script { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.em-script h4 { margin: 0 0 4px; }
.em-step { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.em-step select { min-width: 170px; max-width: 240px; }
.em-step input[type=text] { width: 150px; }
.em-label { max-width: 260px; overflow-wrap: anywhere; }
@media (max-width: 600px) { .em-step select, .em-step input[type=text] { min-width: 0; width: 100%; max-width: none; } }

/* Tozalash chekslisti sozlamasi (Тозалаш режаси): omborga bog'langan band, majburiylik, ombor */
.hk-ck-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.hk-ck-settings { align-items: flex-end; }
.hk-ck-settings .check { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.hk-ck-qty { width: 90px; }
.hk-flag-stock { color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
/* «Сарф ва чеклист» filtri: maydonlar to'rda, tugmalar siqilmasin (375px da ham) */
.hku-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 10px; align-items: end; }
.hku-filter .field { margin: 0; min-width: 0; }
.hku-filter .field select, .hku-filter .field input { width: 100%; min-width: 0; }
.hku-filter-act { display: flex; gap: 6px; align-items: center; }
.hku-filter-act .btn { white-space: nowrap; }
@media (max-width: 600px) { .hku-filter { grid-template-columns: 1fr 1fr; } }

/* Тариф пакетлари (/admin/billing/packages) */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.pkg-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; }
.pkg-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pkg-card-head .card-title { margin: 0; }
.pkg-price b { font-size: 26px; font-variant-numeric: tabular-nums; color: var(--primary); }
.pkg-card p { margin: 0; }
.pkg-card .row-actions { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pkg-mods summary { cursor: pointer; font-weight: 600; }
.pkg-mods ul { margin: 6px 0 0; padding-left: 18px; }
.pkg-out { margin: 0 6px 6px 0; display: inline-block; }
.pkg-opt { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.pkg-opt input { margin-top: 3px; }
.pkg-opt-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pkg-opt-card.is-current { border-color: var(--primary); border-width: 2px; }
.pkg-opt-card form { margin-top: auto; }
.cmp-row { border-top: 1px solid var(--border); padding: 8px 0; }
.cmp-row summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cmp-row .cmp-sum { font-variant-numeric: tabular-nums; font-weight: 600; }
.cmp-row p { margin: 6px 0 2px; }
/* Sayt bo'limlari (egasi 29.11): havoladan rasm, Facebook, xizmat / yangilik rasmlari ro'yxatda */
.st-url-import { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.st-url-import summary { cursor: pointer; font-weight: 600; }
.st-fb { display: flex; gap: 10px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); }
.st-fb .field { flex: 1; margin: 0; }
.st-svc .st-room-photos { margin-top: 8px; }

/* 13.1 bola narxi yoshga qarab — «0 – [2] ёш — [0] %» qatorlari */
.child-bands .cb-rows { display: grid; gap: 6px; }
.child-bands .cb-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.child-bands .cb-row input { width: 5.5rem; min-width: 0; }
.child-bands .cb-row span { color: var(--muted, #64748b); white-space: nowrap; }

/* 6.5 bekor qilish oynasida «Бошқа меҳмонхонага жойлаштирилди» */
details.reloc { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
details.reloc > summary { cursor: pointer; font-weight: 600; list-style: revert; }
details.reloc[open] > summary { margin-bottom: 8px; }

/* 2.11 oylik hisob (to'lovlar oynasi) */
.pms-monthly { margin-top: 16px; border-top: 1px solid var(--line, #e2e8f0); padding-top: 12px; }
.pms-monthly h4 { margin: 0 0 8px; }
.pms-monthly .inline-form { display: inline-flex; margin-left: 6px; }
.pms-monthly > .inline-form { margin: 10px 0 0; }

/* Хоналар ҳолати — раҳбар: белгилаб бир йўла «Тоза» (04.12) */
.hk-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; margin-bottom: 10px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.hk-bulk .check { font-weight: 600; font-size: 13.5px; }
.hk-bulk .btn .ic { width: 15px; height: 15px; }
.hk-bulk .btn:disabled { opacity: .5; cursor: not-allowed; }
details.hk-room > .hk-sum:has(.hk-pick) { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "pick main badge" ". flags flags"; }
.hk-pick { grid-area: pick; width: 20px; height: 20px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.hk-checks .hk-check-all-wrap { justify-self: start; display: flex; gap: 6px; margin-top: 6px; }
.hk-checks .hk-check-all-wrap .hk-check-all { margin-top: 0; }

/* Тозалаш режаси — соддалаштирилган (04.12): ёрлиқлар, ихчам тепа қатор, йиғма қатор, ихчам доска */
.hk-plan-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.hk-tab-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 11.5px; font-weight: 700; text-align: center; }
.hk-plan-tabs a.active .hk-tab-n { background: rgba(255, 255, 255, .25); color: #fff; }
.hk-plan-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.hk-plan-bar form { margin: 0; }
.hk-plan-bar .btn .ic, .hk-plan-bar .btn svg { width: 16px; height: 16px; }
.hk-day { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; }
.hk-day input[type=date] { height: 36px; }
.hk-plan-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.hk-sum-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
span.hk-sum-chip { cursor: default; }
a.hk-sum-chip:hover, button.hk-sum-chip:hover { background: var(--surface-2); border-color: var(--primary); }
.hk-sum-chip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.hk-built { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12.5px; }
.hk-col-nav { display: none; }
.hk-board { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 0 0 16px; }
.hk-col { padding: 10px; min-height: 0; }
.hk-col-list { max-height: min(62vh, 640px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.hk-floor { position: sticky; top: 0; z-index: 1; padding: 6px 4px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    color: var(--muted); background: var(--surface); }
.hk-col-free .hk-floor { background: var(--surface-2, #f8fafc); }
.hk-plan-page .hk-task { display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "unit kind min note" "move move move move";
    align-items: center; gap: 4px 8px; padding: 6px 8px; margin-bottom: 6px; }
.hk-task-unit { grid-area: unit; white-space: nowrap; }
.hk-plan-page .hk-task .badge { grid-area: kind; }
.hk-task-min { grid-area: min; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.hk-task-note { grid-area: note; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; text-align: center; cursor: help; }
.hk-plan-page .hk-move { grid-area: move; margin: 0; }
.hk-plan-page .hk-move select { height: 30px; padding: 2px 8px; font-size: 12.5px; }
@media (hover: hover) and (min-width: 769px) {
    .hk-plan-page .hk-task { grid-template-columns: auto auto 1fr auto minmax(120px, 44%); grid-template-areas: "unit kind min note move"; }
}
.hk-done { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 6px; }
.hk-done > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); list-style: none; padding: 4px; }
.hk-done > summary::-webkit-details-marker { display: none; }
.hk-done .hk-task { grid-template-columns: auto auto 1fr; grid-template-areas: "unit kind min"; }
#hkDistribute .hk-staff-pick { display: grid; gap: 10px; }
.hk-ck-report { margin-left: auto; }
#checklist .card-title { display: flex; align-items: center; gap: 6px; }
@media (max-width: 768px) {
    .hk-built { margin-left: 0; }
    .hk-col-nav { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; padding-bottom: 2px; }
    .hk-col-nav a { flex: none; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text); text-decoration: none; background: var(--surface); }
    .hk-board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; -webkit-overflow-scrolling: touch; }
    .hk-board > .hk-col { flex: 0 0 88%; scroll-snap-align: start; }
    .hk-col-list { max-height: 60vh; }
}

/* Қўлланмадан қидириш (04.12) */
.manual-search { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 6px 18px rgba(13, 17, 27, .08); }
.manual-search-box { flex: 1 1 320px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg, var(--surface)); }
.manual-search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 91, 234, .15); }
.manual-search-box svg { width: 18px; height: 18px; flex: none; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.manual-search-box input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; box-shadow: none; }
.manual-search-n { font-size: 13px; }
mark.ms-hit { background: #fde68a; color: #1f2937; border-radius: 3px; padding: 0 1px; }
html.dark mark.ms-hit, [data-theme="dark"] mark.ms-hit { background: #b45309; color: #fff; }
@media (max-width: 768px) { .manual-search { top: 56px; } }

/* Фойдаланувчилар — меҳмонхоналар кесимида гуруҳлар (04.12): ёпиқ <details>, битта қатор сарлавҳа; ичи узун бўлса — ўзида айланади. */
.ug-list { display: flex; flex-direction: column; gap: 8px; }
.ug { padding: 0; overflow: hidden; }
.ug > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; user-select: none; }
.ug > summary::-webkit-details-marker { display: none; }
.ug > summary:hover { background: var(--surface-2); }
.ug > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ug-ico { display: inline-flex; width: 30px; height: 30px; flex: none; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface-2); color: var(--primary); }
.ug-ico .ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ug-none .ug-ico { color: var(--warn, #d97706); }
.ug-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ug-n { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ug-n b { color: var(--text); font-size: 14px; }
.ug-chev { color: var(--muted); transition: transform .15s; }
.ug[open] > summary .ug-chev { transform: rotate(180deg); }
.ug[open] > summary { border-bottom: 1px solid var(--border); }
.ug-body { max-height: 60vh; overflow: auto; margin: 0; border-radius: 0; }
@media (max-width: 600px) { .ug > summary { padding: 10px 12px; gap: 8px; } .ug-ico { width: 26px; height: 26px; } }

/* Хоналар ҳолати — master-detail (егаси 04.12): тепада ихчам хона плиткалари (ҳолат ранги билан), пастда танланган хона картаси доим очиқ.
   JS (data-hk-detail) рўйхатга .hk-tiles қўшади; JS ишламаса — аввалги очиладиган рўйхат қолади. */
.hk-list.hk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.hk-tiles details.hk-room { border-left-width: 0; border-top: 4px solid var(--border); border-radius: 12px; overflow: hidden; }
.hk-tiles details.hk-room.hk-DIRTY { border-top-color: var(--danger); }
.hk-tiles details.hk-room.hk-INSPECTED { border-top-color: var(--success); }
.hk-tiles details.hk-room.hk-CLEAN { border-top-color: var(--primary); }
.hk-tiles details.hk-room.hk-CLEANING, .hk-tiles details.hk-room.hk-INSPECTION { border-top-color: #d97706; }
.hk-tiles details.hk-room.hk-REPAIR { border-top-color: #6b7280; }
.hk-tiles details.hk-room.hk-DND { border-top-color: #7c3aed; }
.hk-tiles details.hk-room > .hk-sum,
.hk-tiles details.hk-room > .hk-sum:has(.hk-pick) { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; position: relative;
    min-height: 78px; padding: 8px 10px; grid-template-columns: none; border-bottom: 0; }
.hk-tiles .hk-sum-main { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
.hk-tiles .hk-sum-main b { font-size: 17px; }
.hk-tiles .hk-sum-main small { font-size: 11.5px; max-width: 100%; }
.hk-tiles .hk-sum-flags { display: none; }
.hk-tiles .hk-sum .badge { font-size: 11px; padding: 2px 7px; margin-top: auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-tiles .hk-pick { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; }
.hk-tiles .hk-sum:has(.hk-pick) .hk-sum-main { padding-right: 22px; }
.hk-tiles details.hk-room.hk-urgent > .hk-sum .hk-sum-main b::after { content: " •"; color: var(--danger); }
.hk-tiles details.hk-room:hover { background: var(--surface-2); }
.hk-tiles details.hk-room.hk-sel { background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary), var(--shadow); }
.hk-tiles .hk-section { margin: 6px 2px 0; font-size: 14px; }
.hk-detail { margin-top: 14px; padding: 0; scroll-margin-top: 80px; }
.hk-detail[data-hk-status="hk-DIRTY"] { border-top: 4px solid var(--danger); }
.hk-detail[data-hk-status="hk-INSPECTED"] { border-top: 4px solid var(--success); }
.hk-detail[data-hk-status="hk-CLEAN"] { border-top: 4px solid var(--primary); }
.hk-detail[data-hk-status="hk-CLEANING"], .hk-detail[data-hk-status="hk-INSPECTION"] { border-top: 4px solid #d97706; }
.hk-detail[data-hk-status="hk-REPAIR"] { border-top: 4px solid #6b7280; }
.hk-detail[data-hk-status="hk-DND"] { border-top: 4px solid #7c3aed; }
.hk-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.hk-detail-head .hk-sum-main b { font-size: 20px; }
.hk-detail-head .hk-sum-flags { flex: 1 1 100%; order: 3; }
.hk-detail-head .badge { margin-left: auto; }
.hk-detail-body > .hk-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; }
@media (max-width: 600px) {
    .hk-list.hk-tiles { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
    .hk-tiles details.hk-room > .hk-sum, .hk-tiles details.hk-room > .hk-sum:has(.hk-pick) { min-height: 70px; padding: 7px 8px; }
    .hk-detail-head, .hk-detail-body > .hk-body { padding-left: 12px; padding-right: 12px; }
}

/* Хоналар ҳолати: қидирув + саралаш бир қаторда (04.12) */
.hk-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hk-find-q { max-width: 420px; }
.hk-find-q .hk-search { max-width: none; padding-left: 36px; }
.hk-sort { height: 44px; padding: 0 34px 0 12px; border: 1px solid var(--border); border-radius: 12px; background-color: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.hk-sort:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.hk-tiles.hk-sorted .hk-section { display: none; }
@media (max-width: 600px) { .hk-find-q { flex: 1 1 100%; max-width: none; } .hk-sort { flex: 1 1 100%; } }

/* Хоналар ҳолати — икки томонлама (егаси 04.12): чапда хоналар, ўнгда танланган хона (қотиб туради, ўзи айланади). */
@media (min-width: 1000px) {
    .hk-split:has(.hk-tiles) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 42%); gap: 14px; align-items: start; }
    .hk-split .hk-list.hk-tiles { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .hk-split .hk-detail { position: sticky; top: 76px; margin-top: 0; max-height: calc(100vh - 96px); overflow: auto; overscroll-behavior: contain; }
    .hk-split .hk-detail-head { position: sticky; top: 0; z-index: 1; background: var(--surface); }
}

/* Шахматка даври (егаси 04.12): «dd.MM – dd.MM» — календарь очади; яширин sana maydoni tugma ichida (showPicker). */
.desk-range { display: inline-flex; margin: 0; }
.desk-range-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.desk-range-btn .ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.desk-periods > summary { padding: 0 8px; }
.desk-periods .action-menu { right: 0; left: auto; }

/* Шахматка (егаси 04.12): «Бугун» кечадан бошланади — бугун аниқ ажралсин: қалин қизил чизиқ, сарлавҳада «Бугун», ўтган кунлар хира. */
#board > .pms-day.today, #board > .pms-cell.today { box-shadow: inset 3px 0 0 var(--danger); }
#board > .pms-day.today small { color: var(--danger); font-weight: 700; }
#board > .pms-cell.past, #board > .pms-day.past { background-image: linear-gradient(color-mix(in srgb, var(--text) 5%, transparent), color-mix(in srgb, var(--text) 5%, transparent)); }
#board > .pms-day.past { opacity: .75; }
/* Shaxmatka davri: kalendar tugmasi + yozib kiritiladigan sana (egasi 04.12). */
.desk-range-btn { padding-top: 0; padding-bottom: 0; gap: 2px; cursor: default; }
.desk-range-cal { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-left: -4px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.desk-range-cal:hover, .desk-range-cal:focus-visible { background: color-mix(in srgb, currentColor 12%, transparent); outline: none; }
.desk-range-cal input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.desk-range-text { width: 10.5ch; min-width: 0; height: 26px; padding: 0 4px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-variant-numeric: tabular-nums; text-align: center; cursor: text; }
.desk-range-text:hover { border-color: var(--border); }
.desk-range-text:focus { outline: none; border-color: var(--primary); background: var(--bg); }
.desk-range-text.invalid { border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 25%, transparent); }
/* Rekvizitlarning ruscha / inglizcha varianti (egasi 04.12) — yig'iladigan blok. */
.pms-req-i18n { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.pms-req-i18n > summary { cursor: pointer; font-weight: 600; list-style-position: inside; }
.pms-req-i18n[open] > summary { margin-bottom: 10px; }
/* Yangi bron: saqlanmadi — doimiy xato bloki (toast emas), forma tepasida */
.pms-new-err { margin-bottom: 14px; line-height: 1.45; }
.pms-new-err small { display: block; margin-top: 4px; opacity: .85; }
.pms-new-err { display: block; position: relative; padding-right: 40px; }
.pms-new-err .alert-close { position: absolute; top: 8px; right: 8px; }
/* Yangi bron: har tur bo'yicha «сўралди / бўш» (qatorlar ostida); yetmasa — qator qizil */
.pms-avail { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border, #e3e8ef); border-radius: 10px; background: var(--surface-2, #f7f9fc); }
.pms-avail-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.pms-avail-t th { text-align: left; font-weight: 600; color: var(--muted, #64748b); padding: 4px 6px; font-size: 12px; }
.pms-avail-t th:not(:first-child), .pms-avail-t td:not(:first-child) { text-align: right; width: 84px; font-variant-numeric: tabular-nums; }
.pms-avail-t td { padding: 5px 6px; border-top: 1px solid var(--border, #e3e8ef); }
.pms-avail-t tr.short td { color: var(--danger, #c0392b); font-weight: 600; }
.pms-avail-warn { margin: 8px 0 0; color: var(--danger, #c0392b); font-weight: 600; font-size: 13px; }
.pms-avail .hint { margin: 8px 0 0; }
