/* Кабинет «Касса · облако» - в стиле кассового приложения: тёмный фон, неоновые акценты, белые карточки. */
:root {
    --bg1: #1A4552; --bg2: #10303B; --bg3: #0A1B24;
    --text: #1d2320; --muted: #6b7570; --line: #e2e6e4;
    --on-dark: #E8EEF2; --on-dark-muted: #9FB0BB;
    --teal: #2DD4BF; --yellow: #FACC15; --pink: #E879F9; --blue: #60A5FA; --green: #4ADE80; --gray: #94A3B8; --red: #F87171; --violet: #8B7CF6;
    --ok: #0FB65A; --danger: #D9534F;
}
* { box-sizing: border-box; }
/* Атрибут hidden сильнее любых display у классов (.actions и т.п.) - иначе «Удалить выбранные (0)» видна всегда. */
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--text); font-size: 15px;
    background: radial-gradient(900px 600px at -10% -10%, rgba(45,212,191,.16), transparent 60%),
                radial-gradient(900px 700px at 110% 110%, rgba(139,92,246,.14), transparent 60%),
                linear-gradient(135deg, var(--bg1), var(--bg2) 45%, var(--bg3));
    background-attachment: fixed;
}
a { color: #0f766e; }

/* ── Шапка ── */
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand account" "nav nav"; align-items: center; gap: 12px 16px; padding: 12px 20px; }
/* Без JS меню уже занимает отдельную строку. Однострочную шапку включаем только после замера всех кнопок. */
.top.top--inline { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand nav account"; }
.top > .brand { grid-area: brand; justify-self: start; }
.top > .me { grid-area: account; justify-self: end; min-width: 0; max-width: 100%; flex-wrap: wrap; }
.top .chip { max-width: 100%; overflow-wrap: anywhere; }
.brand { color: #fff; font-size: 24px; font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand small { font-size: 13px; font-weight: 600; color: var(--teal); text-transform: uppercase; letter-spacing: .08em; }
.brand-icon { color: #5EEAD4; }
.brand-logo { height: 30px; width: auto; display: block; }
.login .brand-logo { height: 46px; }
.nav { grid-area: nav; display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; justify-content: center; }
.nav > .pill { flex: 0 0 auto; white-space: nowrap; }
.pill {
    --c: var(--teal);
    color: #F1F5F9; text-decoration: none; font-weight: 600; font-size: 14px;
    padding: 9px 16px; border-radius: 9px; border: 1.5px solid var(--c);
    background: color-mix(in srgb, var(--c) 14%, rgba(20,36,48,.85));
    box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent);
    transition: background .15s;
}
.pill:hover, .pill.active { background: color-mix(in srgb, var(--c) 38%, rgba(20,36,48,.85)); }
.pill.teal { --c: var(--teal); } .pill.yellow { --c: var(--yellow); } .pill.pink { --c: var(--pink); }
.pill.blue { --c: var(--blue); } .pill.green { --c: var(--green); } .pill.gray { --c: var(--gray); } .pill.violet { --c: var(--violet); }
.pill.orange { --c: #FB923C; }
.pill.red { --c: #F14635; } /* Kaspi */
.me { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.chip {
    color: var(--on-dark); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
    border-radius: 7px; padding: 6px 11px; font-size: 13px; text-decoration: none; cursor: pointer; font-family: inherit;
}
.chip.red { border-color: rgba(248,113,113,.6); }
.chip.warn { border-color: rgba(250,204,21,.7); background: rgba(250,204,21,.16); }
form.inline { display: inline; margin: 0; }

/* ── Содержимое ── */
.page { max-width: 1280px; margin: 0 auto; padding: 4px 16px 32px; }
.page.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.card { background: #fff; border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.card h1, .card h2 { margin: 0 0 12px; }
h1 { font-size: 22px; } h2 { font-size: 18px; }
.page-title { color: #fff; font-size: 24px; font-weight: 700; margin: 8px 2px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-title .sub { font-size: 14px; font-weight: 400; color: var(--on-dark-muted); }
.muted { color: var(--muted); }
.cash-only .stock-only { display: none !important; }
.grid { display: grid; gap: 16px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi .card { margin: 0; }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.two > * { min-width: 0; }   /* широкая таблица прокручивается внутри, а не растягивает страницу (телефон, 25.10.2026) */
.fiscal-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.fiscal-settings-grid > .card { min-width: 0; }
.fiscal-settings-grid .mono { overflow-wrap: anywhere; }
.fiscal-settings-grid form:not(.inline) { display: grid; gap: 12px; }
.fiscal-help { font-size: 13px; line-height: 1.6; margin: 16px 0 0; }
.export-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.export-heading h2 { margin: 0; }
.export-filter { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.export-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.export-stats > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 8px 12px; min-width: 0; padding: 14px; background: #f4f9f8; border: 1px solid #deebe6; border-radius: 10px; }
.export-stats > div > .muted { font-size: 13px; line-height: 1.4; }
.export-count { font-size: 26px; line-height: 1.1; font-weight: 700; color: #123e39; }
.export-amount { grid-column: 1 / -1; font-size: 14px; line-height: 1.6; font-weight: 600; }
.export-amount strong { display: block; font-size: 16px; }
.export-amount span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.export-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.export-guides > .card { min-width: 0; }
.export-step { display: inline-block; color: #0f766e; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.export-guides p { line-height: 1.6; }
.export-instructions { padding-left: 20px; margin: 20px 0 0; line-height: 1.6; }
.export-instructions li + li { margin-top: 8px; }
.export-note { padding: 12px; border-radius: 8px; background: #eef7f1; font-size: 13px; }
.export-details summary { cursor: pointer; font-weight: 600; }
.export-document-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin-top: 16px; font-size: 14px; line-height: 1.6; }
.export-document-grid h3 { font-size: 15px; margin-bottom: 6px; }
@media (max-width: 1000px) { .export-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 850px) { .fiscal-settings-grid, .export-guides { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .export-stats, .export-document-grid { grid-template-columns: 1fr; } .export-filter > label { width: 100%; } }
@media (max-width: 900px) { .two { grid-template-columns: minmax(0, 1fr); } }

/* ── Таблицы ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; background: #EAF6EF; font-size: 13px; font-weight: 600; padding: 9px 10px; white-space: nowrap; }
td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
tr.link { cursor: pointer; } tr.link:hover td { background: #f3faf6; }
.r { text-align: right; } .b { font-weight: 600; } .nowrap { white-space: nowrap; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #eef2f5; }
.tag.ok { background: #dcfce7; color: #166534; } .tag.bad { background: #fee2e2; color: #991b1b; } .tag.warn { background: #fef9c3; color: #854d0e; }
.neg { color: var(--danger); }

/* ── Формы ── */
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.form .full { grid-column: 1 / -1; }
label { display: block; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
    width: 100%; margin-top: 4px; padding: 9px 11px; font-size: 15px; font-family: inherit;
    border: 1px solid #BFC7C3; border-radius: 7px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ok); box-shadow: 0 0 0 3px rgba(15,182,90,.15); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 15px; margin-top: 8px; }
.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar > * { margin: 0; }
.toolbar label { min-width: 150px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.btn {
    display: inline-block; padding: 9px 16px; border-radius: 7px; border: 1px solid #CFCFCF; background: #F3F3F3;
    color: #222; font-size: 14px; font-family: inherit; cursor: pointer; text-decoration: none; font-weight: 500;
}
.btn:hover { filter: brightness(.95); }
.btn.green { background: var(--ok); border-color: #0A9A4A; color: #fff; font-weight: 600; }
.btn.red { background: var(--danger); border-color: #B94340; color: #fff; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert.ok { background: #dcfce7; color: #14532d; } .alert.err { background: #fee2e2; color: #7f1d1d; } .alert.info { background: #e0f2fe; color: #0c4a6e; } .alert.warn { background: #fef3c7; color: #78350f; }
code, .mono { font-family: Consolas, "Cascadia Mono", monospace; }

/* Инвентаризация: обычные поля кабинета, явный выбор готовых ревизий и каталог в пересчёте. */
.inventory-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.inventory-layout > .card { min-width: 0; }
.inventory-list-heading, .inventory-combine-heading, .inventory-catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inventory-list-heading { margin-bottom: 16px; flex-wrap: wrap; }
.inventory-list-heading h2, .inventory-list-heading p { margin: 0; }
.inventory-list-heading p { margin-top: 4px; font-size: 13px; }
.inventory-list-heading .toolbar { margin: 0; }
.inventory-combine { padding: 14px; border: 1px solid #d9e9df; border-radius: 10px; background: #f4f9f6; margin-bottom: 18px; }
.inventory-combine h3 { margin: 0; font-size: 15px; }
.inventory-combine .tag { background: #e0f2e8; color: #166534; white-space: nowrap; }
.inventory-workflow-hint { font-size: 12px; line-height: 1.5; margin: 8px 0 12px; }
.inventory-combine-fields { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inventory-combine-fields label { flex: 1 1 230px; min-width: 0; }
.inventory-combine-fields .btn { min-height: 40px; }
.inventory-combine .btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.inventory-selection-hint { margin: 10px 0 0; font-size: 12px; line-height: 1.5; }
.inventory-select { width: 52px; text-align: center; }
.inventory-select input { width: 19px; height: 19px; margin: 0; accent-color: var(--ok); vertical-align: middle; cursor: pointer; }
.inventory-select input:disabled { opacity: .4; cursor: not-allowed; }
.inventory-selected td { background: #eaf8ef; }
.inventory-name { font-weight: 600; text-decoration: none; }
.inventory-title { min-width: 180px; overflow-wrap: anywhere; }
.inventory-name-number { white-space: nowrap; }
.inventory-name:hover { text-decoration: underline; }
.inventory-row-meta { display: block; font-size: 12px; margin-top: 5px; }
.inventory-list th, .inventory-list td { padding-left: 8px; padding-right: 8px; }
.inventory-status .tag { white-space: normal; max-width: 150px; line-height: 1.4; }
.inventory-status a { text-decoration: none; }
.inventory-empty { padding: 24px 10px; }
.inventory-create-intro { margin: 0 0 16px; font-size: 13px; line-height: 1.5; }
.inventory-create-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.inventory-create-form > label, .inventory-create-form .actions { margin: 0 !important; }
.inventory-count-toolbar { position: relative; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.inventory-find { flex: 1 1 260px; min-width: 0; }
.inventory-quantity { flex: 0 0 120px; }
.inventory-picker { position: relative; margin-top: 10px; }
.inventory-catalog { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: min(720px, 100%); padding: 16px; background: #fff; border: 1px solid #BFC7C3; border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.2); }
.inventory-catalog-heading { margin-bottom: 12px; align-items: flex-start; }
.inventory-catalog-heading small { display: block; margin-top: 4px; line-height: 1.5; }
.inventory-catalog-items { max-height: 320px; overflow-y: auto; margin-top: 10px; }
.inventory-catalog-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 11px 10px; border: 0; border-top: 1px solid var(--line); background: #fff; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.inventory-catalog-option:hover, .inventory-catalog-option:focus-visible { background: #edf8f1; }
.inventory-catalog-option > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.inventory-catalog-option small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.inventory-catalog-stock { flex-shrink: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.inventory-catalog-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; font-size: 12px; }
.inventory-catalog-footer > span { flex: 1; }
@media (max-width: 640px) {
    .inventory-create-form { grid-template-columns: minmax(0, 1fr); }
    .inventory-combine-fields .btn, #inventoryCatalogToggle { width: 100%; }
    .inventory-catalog { padding: 12px; }
    .inventory-catalog-option { align-items: flex-start; }
    .inventory-catalog-stock { white-space: normal; text-align: right; }
}

/* ── Вход ── */
.login { width: 380px; max-width: 100%; }
.login .card { padding: 26px 28px; }
.login .brand { justify-content: center; margin-bottom: 18px; font-size: 30px; }

/* ── Вкладки внутри раздела ── */
.tabs { display: flex; gap: 4px; margin: -4px 0 12px; flex-wrap: wrap; }
.tab {
    color: var(--on-dark); text-decoration: none; font-weight: 600; font-size: 14px;
    padding: 8px 16px; border-radius: 8px 8px 0 0; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); border-bottom: 0;
}
.tab:hover { background: rgba(255,255,255,.18); }
.tab.active { background: #fff; color: var(--text); }

/* ── Мини-график по дням ── */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars .fill { width: 100%; background: linear-gradient(180deg, #2DD4BF, #0FB65A); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .d { font-size: 11px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.bars .v { font-size: 10px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; }

@media (max-width: 640px) {
    /* Телефон (25.10.2026): шапка занимала четверть экрана. Логотип и учётная запись - одной строкой, разделы - одной строкой
       с прокруткой вбок (как вкладки в приложениях), без переноса в два-три ряда. */
    .top { padding: 8px 10px; gap: 8px; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand account" "nav nav"; }
    .top > .me { justify-self: end; margin-left: 0; gap: 4px; flex-wrap: nowrap; }
    .top .chip { padding: 4px 8px; font-size: 12px; white-space: nowrap; }
    /* правая часть ужимается: логин и «👁 клиент» обрезаются многоточием, язык и «Выход» - нет */
    .top > .me > .chip:not(.red) { min-width: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
    .top > .me > .chip.warn { max-width: 90px; }
    .top > .me > .language-switch, .top > .me > form { flex-shrink: 0; }
    .brand-logo { height: 22px; } .brand small { font-size: 10px; }
    .nav { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 2px 10px 6px; }
    .nav::-webkit-scrollbar { display: none; }
    .nav > .pill { padding: 6px 12px; font-size: 13px; box-shadow: none; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { white-space: nowrap; padding: 7px 12px; font-size: 13px; }
    .page { padding: 4px 10px 24px; } .card { padding: 14px; }
    .page-title { font-size: 22px; } .page-title .sub { display: block; font-size: 12px; margin-top: 2px; }
    .hide-sm { display: none; }
    /* фильтры: поля делят строку поровну (даты «с» и «по» рядом), а не стоят по одному */
    .toolbar label { min-width: 0; flex: 1 1 130px; }
    .toolbar label > input:not([type=checkbox]):not([type=radio]), .toolbar label > select { width: 100%; }
    /* показатели обзора - 2×2, а не по одному на экран */
    .grid.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpi .card { padding: 12px; }
    .kpi .value { font-size: 20px; overflow-wrap: anywhere; }
    .bars .d { font-size: 10px; }
    .bars .bar:nth-last-child(even) .d { visibility: hidden; }  /* сегодняшняя подпись остаётся */
    .bars .v { display: none; }
    /* таблица карточками: каждая строка - блок, подписи из data-label */
    table.cards-sm thead { display: none; }
    table.cards-sm tr { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
    table.cards-sm td { display: block; border: 0; padding: 3px 0; text-align: left; white-space: normal; }
    table.cards-sm td.hide-sm { display: none; }
    table.cards-sm tr.sub { border-top: 0; padding-top: 0; }
    table.cards-sm td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
}
@media (max-width: 400px) {
    .top .brand small { display: none; }
}

/* ── Строка настройки: слева название и пояснение, справа выбор одинаковой ширины ── */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; }
.setting-row > div { min-width: 0; }
.setting-row b { display: block; font-size: 15px; }
.setting-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.setting-row select { width: 250px; flex: 0 0 250px; margin: 0; }
@media (max-width: 640px) { .setting-row { flex-direction: column; align-items: stretch; } .setting-row select { width: 100%; flex-basis: auto; } }
/* Админка → клиент: входы в кабинет (логин и имя правятся прямо в строке). */
.owner-row { padding: 10px 0; border-top: 1px solid var(--line); }
.owner-row:first-of-type { border-top: 0; padding-top: 0; }
.owner-edit { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin: 0; }
.owner-edit label { flex: 1 1 130px; min-width: 0; }
.owner-edit input { min-width: 0; margin: 4px 0 0; padding: 7px 9px; font-size: 14px; }
.owner-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 13px; }
.phones { margin-top: 6px; font-size: 13px; line-height: 1.6; }
.phones .phone { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.phones summary { cursor: pointer; width: max-content; }
.mail-history summary { cursor: pointer; font-size: 18px; font-weight: 700; }
.mail-history .table-wrap { margin-top: 14px; max-height: 320px; overflow: auto; }
/* Название в строке таблицы: поле + кнопка «Переименовать». */
.inline-rename { display: flex; gap: 6px; max-width: 460px; margin: 0; }
.inline-rename input { margin: 0; min-width: 0; }
.inline-rename.compact input { padding: 6px 9px; font-size: 14px; }
.device-name-edit { max-width: 300px; }
.device-name-edit summary { display: flex; align-items: center; gap: 8px; width: fit-content; cursor: pointer; list-style: none; }
.device-name-edit summary::-webkit-details-marker { display: none; }
.device-name-edit summary span { color: var(--muted); }
.device-name-edit .inline-rename { flex-wrap: wrap; margin-top: 8px; }
.device-name-edit input { flex-basis: 100%; }
.opt-hint { font-size: 13px; margin: 4px 0 0 26px; }

/* Правило пароля под полем нового пароля (_PasswordRules): выполненные пункты - зелёные. */
.pw-rules { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: "✓ "; }

/* Права кассира - галочки в строку (Пользователи кассы) */
.rights { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.rights label.check { margin: 0; font-size: 13px; font-weight: 500; }

/* Сотрудники кабинета - карточка на сотрудника */
.staff { border: 1px solid var(--line, #e3e8e6); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.staff.off { opacity: .65; }
/* Карточка товара: широкое поле (NTIN с кнопками) - на две колонки; флажки - сеткой, раскрытые блоки - на всю ширину. */
.form .wide { grid-column: span 2; }
@media (max-width: 720px) { .form .wide { grid-column: 1 / -1; } }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; align-items: start; }
.opts > .open { grid-column: 1 / -1; }
/* Товары: панель действий над отмеченными галочками (облако 1.0.69) - одна строка: счётчик, ценники, «список + кнопка» парами, удалить справа. */
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; padding: 8px 10px; background: #F4F8F6; border: 1px solid var(--line); border-radius: 9px; }
.bulk-bar[hidden] { display: none; }
.bulk-bar .bulk-title { font-size: 13px; color: var(--muted); margin-right: 4px; }
.bulk-bar .bulk-title b { color: var(--text); }
.bulk-bar .btn.small { height: 32px; line-height: 20px; white-space: nowrap; }
.bulk-pair { display: inline-flex; align-items: stretch; }
.bulk-pair select { width: auto; min-width: 130px; height: 32px; margin: 0; padding: 4px 8px; font-size: 13px; border-radius: 7px 0 0 7px; }
.bulk-pair .btn { border-radius: 0 7px 7px 0; margin-left: -1px; }
.bulk-action-pair { flex-wrap: wrap; gap: 4px; }
.bulk-action-pair select { min-width: 215px; border-radius: 7px; }
.bulk-action-pair input { width: 100px; height: 32px; margin: 0; padding: 4px 8px; font-size: 13px; }
.bulk-action-pair .btn { margin-left: 0; border-radius: 7px; }
.quick-store-bar { display:flex; gap:20px; align-items:center; flex-wrap:wrap; }
.quick-store-bar .toolbar, .quick-store-bar p { margin:0; }
.quick-store-bar p { flex:1; min-width:200px; }
.quick-workspace { display:grid; grid-template-columns:310px minmax(0,1fr); gap:16px; align-items:start; }
.quick-workspace > .card { min-width:0; }
.quick-create-form { padding:14px; border:1px solid #d5e8df; background:#f3f9f6; border-radius:10px; margin-bottom:16px; }
.quick-create-form input[type=text] { min-height:42px; }
.quick-create-form .btn { width:100%; margin-top:10px; min-height:40px; }
.quick-group-list { display:grid; gap:8px; }
.quick-group-link { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:12px 14px; color:var(--text); text-decoration:none; border:1px solid var(--line); border-radius:9px; background:#fff; }
.quick-group-link span { overflow-wrap:anywhere; min-width:0; font-weight:600; }
.quick-group-link b { font-size:12px; border-radius:20px; padding:2px 8px; background:#eaf5ee; color:#176b48; }
.quick-group-link:hover, .quick-group-link.selected, .quick-group-item.selected > .quick-group-link { border-color:var(--ok); background:#eef9f3; }
.quick-group-edit { padding:0 12px 8px; }
.quick-group-edit summary { cursor:pointer; color:var(--muted); font-size:12px; padding:6px 2px; }
.quick-group-edit form { padding:6px 0; }
.quick-group-edit .actions { margin-top:10px; }
.quick-products-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:12px; }
.quick-products-heading h2 { margin:0 0 4px; overflow-wrap:anywhere; }
.quick-products-heading p { margin:0; }
.quick-guide { font-size:13px; line-height:1.5; margin:0 0 16px; }
.quick-empty { padding:32px 16px; text-align:center; }
.quick-selection-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:12px; margin-top:14px; background:#f3f9f6; border:1px solid #d5e8df; border-radius:9px; }
.quick-selection-actions[hidden] { display:none; }
.quick-selection-actions select { width:auto; max-width:100%; margin:0; min-height:40px; }
@media (max-width:1000px) { .quick-workspace { grid-template-columns:260px minmax(0,1fr); } }
@media (max-width:760px) { .quick-workspace { grid-template-columns:minmax(0,1fr); } .quick-group-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:480px) { .quick-group-list { grid-template-columns:minmax(0,1fr); } .quick-products-heading .btn, .quick-selection-actions select, .quick-selection-actions .btn { width:100%; } }
.bulk-bar .bulk-del { margin-left: auto; }
.bulk-delete-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.bulk-delete-actions .bulk-del { margin-left: 0; }
@media (max-width: 640px) { .bulk-bar .bulk-del { margin-left: 0; } .bulk-pair { flex: 1 1 100%; } .bulk-pair select { flex: 1; } }
/* Карточка товара (облако 1.0.70): ровная сетка 4 колонки - артикул, NTIN (шире), единица; группа, НДС, комитент, критический
   остаток; закупка, цена, опт; код весов и остаток. На планшете - 2 колонки, на телефоне - 1. */
.form.product-form { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
@media (max-width: 980px) { .form.product-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .form.product-form { grid-template-columns: 1fr; } }
.stock-info { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; background: #F4F8F6; border: 1px solid var(--line); border-radius: 8px; }
.stock-info b { font-size: 18px; }
/* Kaspi → заказы (облако 1.0.156): кнопки действий под заказом, поле кода покупателя, причина отмены. */
.kaspi-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kaspi-code { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; max-width: 100%; }
.kaspi-code input, .kaspi-code select { margin: 0; min-width: 0; width: auto; flex: 1 1 140px; padding: 6px 9px; font-size: 14px; }
.kaspi-cancel summary { list-style: none; cursor: pointer; }
.kaspi-cancel summary::-webkit-details-marker { display: none; }
.kaspi-cancel[open] form { margin-top: 8px; }
/* Kaspi → Подключение (облако 1.0.157): у магазина - код точки и город, строкой; на телефоне - друг под другом. */
.form.kaspi-point { margin-bottom: 10px; }
/* Админка → Заявки → Instagram (облако 1.0.162): чаты директа слева, переписка справа; на телефоне - по очереди. */
.ig { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 14px; align-items: start; }
.ig-list { padding: 6px; max-height: 70vh; overflow: auto; }
.ig-chat { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 9px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.ig-chat:hover, .ig-chat.active { background: #eef2f5; }
.ig-chat b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-when { font-size: 12px; text-align: right; }
.ig-preview { grid-column: 1 / -1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-dialog-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ig-back { display: none; }
.ig-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; padding: 4px 0; }
.ig-msg { max-width: 80%; padding: 8px 11px; border-radius: 10px; background: #eef2f5; overflow-wrap: anywhere; }
.ig-msg.out { align-self: flex-end; background: #dcfce7; }
.ig-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ig-meta { font-size: 11px; margin-top: 3px; }
.ig-reply-form textarea { width: 100%; margin: 8px 0 0; }
.ig-comment.done { opacity: .75; }
.ig-comment-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.ig-reply { margin: 6px 0 0 14px; font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 800px) {
    .ig { grid-template-columns: 1fr; }
    .ig.has-chat .ig-list { display: none; }
    .ig-back { display: inline-block; }
    .ig-msg { max-width: 92%; }
}
/* Тарифы (облако 1.0.172): кнопки в карточке клиента в админке и «Настройки → Подписка». */
.plan-pick { display: flex; flex-direction: column; gap: 4px; }
.plan-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-btn { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.plan-btn input { position: absolute; opacity: 0; pointer-events: none; }
.plan-btn small { color: var(--muted); font-size: 12px; }
.plan-btn:has(input:checked) { border-color: #0F6E56; background: #E1F5EE; box-shadow: 0 0 0 1px #0F6E56; }
.plan-btn:has(input:focus-visible) { outline: 2px solid #22cba5; outline-offset: 2px; }
.sub-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sub-head .sub-name { font-size: 20px; font-weight: 700; }
.sub-head .btn { margin-left: auto; }
.sub-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.sub-meter { background: #F4F6F5; border-radius: 10px; padding: 10px 12px; }
.sub-meter b { font-size: 18px; display: block; }
.sub-bar { height: 6px; background: var(--line); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.sub-bar i { display: block; height: 6px; background: #1D9E75; border-radius: 3px; }
.sub-bar.full i { background: #BA7517; }
.sub-bar.over i { background: var(--danger); }
.sub-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.sub-list li::before { content: "✓"; color: #0F6E56; margin-right: 6px; font-weight: 700; }
.sub-list li.off { color: #9aa3a0; }
.sub-list li.off::before { content: "-"; color: #9aa3a0; }
.sub-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.sub-compare { width: 100%; }
@media (max-width: 700px) {
    .sub-meters, .sub-prices { grid-template-columns: minmax(0, 1fr); }
    .sub-list { grid-template-columns: minmax(0, 1fr); }
    .sub-head .btn { margin-left: 0; width: 100%; text-align: center; }
}
