/*!
 * InnCloud Suite — гостиничная ERP-платформа (PMS, POS, склад, бухгалтерия, HR, CRM).
 *
 * Copyright (c) 2026 Balybin Sergey (Балыбин Сергей). Все права защищены.
 * Разработчик и правообладатель: Balybin Sergey.
 * Все авторские и исключительные права на данную программу принадлежат Balybin Sergey.
 *
 * Программа распространяется по подписке в модели SaaS (Software as a Service).
 * Копирование, изменение, распространение, декомпиляция и использование без
 * действующей подписки или письменного разрешения правообладателя запрещены.
 */
:root { color-scheme: light; }
.dark { color-scheme: dark; }
[x-cloak] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

:root { --erp-border: oklch(.92 .004 286); --erp-muted: oklch(.52 .016 286); --erp-soft: oklch(.97 .001 286); --erp-surface: oklch(1 0 0); --erp-text: oklch(.21 .006 286); --erp-danger: oklch(.55 .23 16); --erp-ring: oklch(.69 .17 162); }
.dark { --erp-border: oklch(.32 .006 286); --erp-muted: oklch(.72 .015 286); --erp-soft: oklch(.24 .006 286); --erp-surface: oklch(.21 .006 286); --erp-text: oklch(.985 0 0); --erp-danger: oklch(.72 .19 16); }
.doc-line { display:flex; flex-wrap:nowrap; gap:8px; align-items:end; border-bottom:1px solid var(--erp-border); padding:5px 0; }
.doc-product { flex:3 1 230px; min-width:200px; }
.doc-product select { width:100%; }
.doc-field { flex:1 0 105px; min-width:105px; }
.field-caption { display:block; margin-bottom:3px; font-size:12px; color:var(--erp-muted); }
.doc-input { width:100%; height:36px; border:1px solid var(--erp-border); border-radius:6px; background:transparent; padding:0 10px; font-variant-numeric:tabular-nums; }
.doc-field select { width:100%; }
.doc-amount { flex:1 0 120px; min-width:120px; }
.doc-amount output { display:flex; min-height:36px; align-items:center; font-variant-numeric:tabular-nums; font-weight:600; overflow-wrap:anywhere; }
.doc-remove { flex:0 0 36px; width:36px; height:36px; display:grid; place-items:center; color:var(--erp-danger); border:1px solid var(--erp-border); border-radius:6px; background:transparent; font-size:24px; line-height:1; }
.doc-total { display:flex; justify-content:space-between; gap:12px; background:var(--erp-soft); padding:16px; border-radius:6px; font-variant-numeric:tabular-nums; }

.doc-lines { overflow-x:auto; }
.doc-line { min-width:660px; }
.field-caption { white-space:nowrap; }
.doc-line .doc-field select { height:36px; }
.doc-remove:hover { background:var(--erp-soft); }
.search-native { display:none !important; }
.search-trigger { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-width:0; height:44px; padding:0 10px; border:1px solid var(--erp-border); border-radius:6px; background:transparent; color:var(--erp-text); text-align:left; font-size:14px; }
.search-trigger > span:first-child { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.doc-line .search-trigger { height:36px; }
.search-trigger:focus-visible, .product-popup input:focus { outline:2px solid var(--erp-ring); outline-offset:1px; }
.product-popup { position:fixed; z-index:100; border:1px solid var(--erp-border); border-radius:6px; background:var(--erp-surface); color:var(--erp-text); overflow:hidden; }
.product-popup[hidden] { display:none; }
.product-popup input { display:block; width:100%; height:44px; padding:0 12px; background:transparent; color:inherit; border:0; border-bottom:1px solid var(--erp-border); font-size:16px; }
.product-options { overflow:auto; padding:4px; }
.product-options button { display:block; width:100%; padding:9px 10px; text-align:left; border-radius:4px; font-size:14px; white-space:normal; overflow-wrap:anywhere; }
.product-options .is-active, .product-options button:hover { background:var(--erp-soft); }
.product-options p { padding:12px; color:var(--erp-muted); font-size:14px; }

.choice-row { display:flex; align-items:center; padding-left:calc(var(--tree-depth, 0) * 16px); }
.product-options .choice-fold { flex:0 0 28px; width:28px; padding:6px 0; color:var(--erp-muted); text-align:center; font-size:20px; }
.product-options .choice-option { position:relative; flex:1; min-width:0; padding-right:28px; }
.choice-option small { display:block; margin-top:2px; font-size:11px; color:var(--erp-muted); }
.choice-check { position:absolute; right:8px; top:10px; color:var(--erp-ring); }
.choice-option[aria-selected="true"] { color:var(--erp-ring); }
.erp-tree-name { display:flex; align-items:center; gap:8px; padding-left:calc(min(var(--tree-depth, 0), 6) * 20px); }
.erp-tree-fold { display:grid; place-items:center; flex:0 0 28px; width:28px; height:28px; border:1px solid var(--erp-border); border-radius:4px; color:var(--erp-muted); }
.erp-tree-fold:hover { background:var(--erp-soft); }
.erp-tree-icon { color:var(--erp-muted); }
.search-trigger:disabled { opacity:.5; cursor:not-allowed; }
.search-trigger[hidden] { display:none; }
.search-trigger[aria-invalid="true"] { border-color:var(--erp-danger); }

.erp-tree-name { min-width:220px; }

/* POS floor: all colours inherit semantic ERP tokens. */
:root { --erp-warning:oklch(.58 .14 70); --erp-ready:oklch(.48 .13 162); --erp-info:oklch(.53 .16 250); --erp-on-primary:oklch(.99 0 0); }
.dark { --erp-warning:oklch(.82 .15 80); --erp-ready:oklch(.76 .17 162); --erp-info:oklch(.76 .14 250); }
.pos-halls button { border-bottom:2px solid transparent; border-radius:0; }
.pos-halls button:hover { border-color:var(--erp-ring); }
.pos-floor-tools { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:6px 0 10px; font-size:11px; color:var(--erp-muted); }
.pos-tool { display:grid; place-items:center; width:34px; height:34px; border:1px solid var(--erp-border); border-radius:6px; font-size:20px; }
.pos-tool.is-selected { background:var(--erp-soft); color:var(--erp-ring); }
.pos-floor { flex:1; min-height:240px; position:relative; border:1px solid var(--erp-border); border-radius:8px; background:var(--erp-soft); overflow:auto; }
.pos-floor.is-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); align-content:start; gap:8px; padding:8px; }
.pos-table { position:absolute; border:1px solid var(--erp-ready); border-radius:8px; background:var(--erp-surface); color:var(--erp-text); overflow:hidden; min-width:24px; min-height:24px; }
.pos-table.occupied { border-color:var(--erp-warning); }
.pos-table.bill { border-color:var(--erp-danger); }
.pos-table.is-round { border-radius:24px; }
.pos-floor.is-grid .pos-table { position:relative; width:auto; height:132px; }
.pos-table-main { width:100%; height:100%; padding:7px; display:flex; flex-direction:column; align-items:stretch; text-align:left; user-select:none; -webkit-user-select:none; }
.pos-table-head { display:flex; align-items:center; justify-content:space-between; gap:3px; }
.pos-table-head b { font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pos-table-head small,.pos-table-meta { font-size:10px; color:var(--erp-muted); }
.pos-table-meta span,.pos-table-meta small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pos-table-states { display:flex; flex-wrap:wrap; gap:3px; margin-top:3px; }
.pos-status { display:inline-flex; align-items:center; padding:2px 5px; border-radius:4px; font-size:10px; line-height:1.3; background:var(--erp-soft); }
.state-waiting { color:var(--erp-danger); }.state-cooking { color:var(--erp-warning); }.state-ready { color:var(--erp-ready); }.state-served { color:var(--erp-muted); }
.pos-table.is-tiny .pos-table-meta,.pos-table.is-tiny .pos-table-head small { display:none; }
.pos-table.is-tiny .pos-table-main { padding:3px; }
.pos-table.is-tiny .pos-table-head b { font-size:12px; }
.pos-table.is-tiny .pos-status { padding:0 2px; font-size:9px; }
.pos-table-dishes { position:absolute; bottom:5px; left:7px; right:7px; max-height:42px; overflow-y:auto; font-size:10px; scrollbar-width:thin; }
.pos-mini-line { display:flex; gap:4px; min-width:0; }
.pos-table-info { position:absolute; top:3px; right:3px; font-size:13px; color:var(--erp-muted); background:var(--erp-surface); opacity:0; }
.pos-table:hover .pos-table-info,.pos-table-info:focus { opacity:1; }
.pos-category-nav { border-bottom:1px solid var(--erp-border); padding-bottom:8px; }
.pos-breadcrumb { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:12px; }
.pos-breadcrumb button { padding:6px; }.pos-breadcrumb .is-selected { color:var(--erp-ring); font-weight:600; }
.pos-chevron { color:var(--erp-muted); padding:0 4px; }
.pos-category-children { display:flex; flex-wrap:wrap; gap:6px; margin-top:5px; max-height:110px; overflow-y:auto; }
.pos-category-children button { display:flex; gap:8px; align-items:center; padding:7px 10px; border:1px solid var(--erp-border); border-radius:6px; font-size:13px; }
.pos-detail-enter { transition:opacity .22s,transform .22s; }.pos-detail-start { opacity:0; transform:translateY(25px) scale(.98); }.pos-detail-end { opacity:1; transform:translateY(0) scale(1); }
.pos-detail-order { border-top:1px solid var(--erp-border); padding-top:12px; }.pos-detail-meta { color:var(--erp-muted); font-size:11px; margin:4px 0; }
.pos-detail-line { padding:10px 0; border-bottom:1px solid var(--erp-border); font-size:13px; }
.pos-progress { height:5px; border-radius:4px; overflow:hidden; background:var(--erp-soft); margin-top:6px; }.pos-progress>div { height:100%; background:var(--erp-warning); }.pos-progress>div.is-overdue { background:var(--erp-danger); }
.pos-detail-action { width:100%; padding:12px; border-radius:6px; background:var(--erp-ring); color:var(--erp-on-primary); font-size:14px; margin-top:12px; }
@media(max-width:640px) { .pos-table-info { opacity:1; } .pos-floor { min-height:350px; } }
@media(prefers-reduced-motion:reduce) { .pos-detail-enter { transition:none; } }

:root { --erp-qr-paper:oklch(1 0 0); }
.kds-qr { width:192px; height:192px; padding:12px; background:var(--erp-qr-paper); border-radius:6px; } .kds-qr img { width:100%; height:100%; }

/* Recognition result: one quiet status band; only the warning icon is amber. */
.scan-notice { --scan-tone:var(--erp-ready); width:100%; margin-top:8px; padding:8px 10px; border-left:3px solid var(--scan-tone); border-radius:4px; background:var(--erp-soft); color:var(--erp-text); font-size:12px; line-height:1.45; }
.scan-notice.is-warning { --scan-tone:var(--erp-warning); }
.scan-notice-head { display:flex; align-items:baseline; gap:8px; min-width:0; }
.scan-notice-symbol { flex:none; color:var(--scan-tone); font-weight:600; }
.scan-notice-title { flex:1; min-width:0; overflow-wrap:anywhere; }
.scan-notice-time { flex:none; color:var(--erp-muted); font-size:11px; font-variant-numeric:tabular-nums; }
.scan-notice-list { margin:4px 0 0 20px; padding:0; list-style:none; font-size:11px; }
.scan-notice-list li { overflow-wrap:anywhere; }
.scan-notice-list li+li { margin-top:3px; }

/* Shared compact header: fixed actions, flexible property name. */
.suite-header { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px; height:56px; padding:0 12px; }
.suite-brand { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.suite-brand-icon { display:none; width:26px; height:26px; color:var(--erp-ring); flex-shrink:0; }
.suite-wordmark { display:flex; flex-direction:column; font-size:17px; font-weight:650; line-height:1.1; white-space:nowrap; }
.suite-wordmark small { margin-top:3px; font-size:10px; font-weight:500; text-transform:uppercase; color:var(--erp-ring); }
.suite-custom-name { width:100px; overflow-wrap:anywhere; font-size:13px; line-height:1.15; }
.suite-property { position:relative; min-width:0; }
.suite-property-trigger { border:1px solid var(--erp-border); border-radius:6px; background:var(--erp-soft); color:var(--erp-text);  width:100%; height:40px; display:flex; justify-content:space-between; gap:6px; padding:0 8px; font-size:13px; }
.suite-property-menu { border:1px solid var(--erp-border); border-radius:8px; padding:4px; background:var(--erp-surface); color:var(--erp-text);  position:fixed; top:60px; left:12px; right:12px; max-height:60dvh; overflow:auto; }
.suite-header-actions { display:flex; align-items:center; gap:4px; flex-shrink:0; }
@media(min-width:380px) { .suite-brand-icon { display:block; } }
@media(min-width:640px) {
  .suite-header { display:flex; gap:20px; padding:0 24px; }
  .suite-wordmark { flex-direction:row; align-items:baseline; gap:5px; font-size:19px; }
  .suite-wordmark small { font-size:19px; text-transform:none; margin:0; font-weight:400; }
  .suite-custom-name { width:auto; max-width:240px; font-size:16px; }
  .suite-property { width:240px; }
  .suite-property-menu { border:1px solid var(--erp-border); border-radius:8px; padding:4px; background:var(--erp-surface); color:var(--erp-text);  position:absolute; top:44px; left:0; right:auto; width:320px; }
  .suite-header-actions { margin-left:auto; gap:12px; }
}

.suite-topbar { position:sticky; top:0; z-index:40; border-bottom:1px solid var(--erp-border); background:var(--erp-surface); color:var(--erp-text); }
.suite-property-trigger>span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; }
.suite-property-trigger svg,.suite-property-option svg,.suite-icon-button svg { width:18px; height:18px; flex:none; }
.suite-property-trigger .suite-property-icon { display:none; }
.suite-icon-button { display:grid; place-items:center; width:40px; height:40px; border-radius:6px; background:transparent; color:var(--erp-muted); }
.suite-icon-button:hover,.suite-property-option:hover { background:var(--erp-soft); color:var(--erp-text); }
.suite-icon-button:focus-visible,.suite-property-trigger:focus-visible,.suite-property-option:focus-visible { outline:2px solid var(--erp-ring); outline-offset:2px; }
.suite-property-option { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; padding:10px; text-align:left; border-radius:4px; font-size:14px; }
.suite-property-option>span { min-width:0; overflow-wrap:anywhere; }
.suite-property-option small,.suite-menu-label { color:var(--erp-muted); font-size:11px; }
.suite-property-option svg { color:var(--erp-ring); }
.suite-menu-label { padding:6px 10px; }
.suite-live,.suite-user { display:none; }
@media(min-width:640px) { .suite-property-trigger .suite-property-icon { display:block; } .suite-live { display:flex; align-items:center; gap:6px; color:var(--erp-muted); font-size:12px; } .suite-live-dot { width:6px; height:6px; border-radius:50%; } .suite-live-dot.is-online { background:var(--erp-ring); } .suite-live-dot.is-offline { background:var(--erp-danger); } }
@media(min-width:1024px) { .suite-user { display:block; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--erp-muted); font-size:13px; } }

/* v138 — единая кнопка «Попросить InnCloud AI помочь»: живой градиент, мерцание, искра */
.ic-ai{position:relative;isolation:isolate;display:inline-flex;align-items:center;gap:.55rem;min-height:2.5rem;padding:.35rem 1rem .35rem .4rem;border:0;border-radius:999px;color:#fff;font-size:.875rem;font-weight:600;letter-spacing:.01em;white-space:nowrap;cursor:pointer;
  background:linear-gradient(110deg,#6d28d9,#4f46e5 30%,#0ea5e9 60%,#14b8a6 85%,#6d28d9);background-size:250% 100%;animation:icAiFlow 6s linear infinite;box-shadow:0 6px 20px -8px rgba(79,70,229,.7),inset 0 1px 0 rgba(255,255,255,.25);transition:transform .15s,box-shadow .2s;overflow:hidden}
.ic-ai::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.35) 50%,transparent 70%);transform:translateX(-120%);animation:icAiShine 3.2s ease-in-out infinite}
.ic-ai:hover{transform:translateY(-1px);box-shadow:0 10px 28px -8px rgba(14,165,233,.8),inset 0 1px 0 rgba(255,255,255,.3)}
.ic-ai:active{transform:translateY(0) scale(.98)}
.ic-ai:disabled,.ic-ai[aria-busy=true]{opacity:.65;cursor:wait}
.ic-ai__orb{display:grid;place-items:center;width:1.85rem;height:1.85rem;flex:none;border-radius:999px;background:rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
.ic-ai__orb svg,.ic-ai__orb i{width:1rem;height:1rem;animation:icAiSpark 2.4s ease-in-out infinite}
.ic-ai__brand{font-weight:700}
.ic-ai.is-sm{min-height:2.1rem;padding:.25rem .8rem .25rem .3rem;font-size:.78rem}.ic-ai.is-sm .ic-ai__orb{width:1.5rem;height:1.5rem}
.ic-ai.is-round{padding:0;width:3.5rem;height:3.5rem;justify-content:center}.ic-ai.is-round .ic-ai__orb{width:2.4rem;height:2.4rem}
.ic-ai-note{display:inline-flex;align-items:center;gap:.25rem;border-radius:999px;padding:.05rem .45rem;font-size:10px;font-weight:600;color:#4f46e5;background:linear-gradient(90deg,rgba(109,40,217,.12),rgba(14,165,233,.12))}
.dark .ic-ai-note{color:#a5b4fc}
@keyframes icAiFlow{to{background-position:250% 0}}
@keyframes icAiShine{0%,55%{transform:translateX(-120%)}100%{transform:translateX(120%)}}
@keyframes icAiSpark{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.18) rotate(12deg)}}
@media (prefers-reduced-motion:reduce){.ic-ai,.ic-ai::after,.ic-ai__orb svg,.ic-ai__orb i{animation:none}}

/* v138.1 — «думающий мозг» в кнопке и окно ожидания ответа InnCloud AI */
.ic-ai__orb svg,.ic-ai__orb i{animation:icAiBrain 1.8s ease-in-out infinite}
.ic-ai.is-attn{box-shadow:0 0 0 0 rgba(245,158,11,.7);animation:icAiFlow 6s linear infinite,icAiAttn 1.6s ease-out infinite}
.ic-think{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:1rem;background:rgba(9,9,11,.55);backdrop-filter:blur(6px);animation:icFade .2s ease-out}
.ic-think[hidden]{display:none}
.ic-think__card{width:min(22rem,100%);border-radius:1.25rem;padding:1.75rem 1.5rem 1.25rem;text-align:center;color:#18181b;background:#fff;box-shadow:0 30px 80px -20px rgba(79,70,229,.6)}
.dark .ic-think__card{color:#fafafa;background:#18181b}
.ic-think__brain{position:relative;width:6rem;height:6rem;margin:0 auto 1rem;display:grid;place-items:center;border-radius:999px;color:#fff;background:linear-gradient(135deg,#6d28d9,#4f46e5,#0ea5e9,#14b8a6);background-size:250% 250%;animation:icAiFlow 4s linear infinite}
.ic-think__brain svg{width:3rem;height:3rem;animation:icAiBrain 1.4s ease-in-out infinite}
.ic-think__brain::before,.ic-think__brain::after{content:"";position:absolute;inset:-6px;border-radius:999px;border:2px solid rgba(99,102,241,.5);animation:icRing 2s ease-out infinite}
.ic-think__brain::after{animation-delay:1s}
.ic-think__title{font-weight:700;font-size:1.05rem}
.ic-think__msg{min-height:2.5rem;margin-top:.35rem;font-size:.85rem;color:#71717a;transition:opacity .3s}
.ic-think__dots{display:flex;justify-content:center;gap:.35rem;margin:.75rem 0 1rem}
.ic-think__dots i{width:.45rem;height:.45rem;border-radius:999px;background:#6366f1;animation:icDot 1.2s ease-in-out infinite}
.ic-think__dots i:nth-child(2){animation-delay:.15s}.ic-think__dots i:nth-child(3){animation-delay:.3s}
.ic-think__cancel{min-height:2.5rem;padding:0 1.25rem;border-radius:999px;border:1px solid #e4e4e7;font-size:.85rem;font-weight:600;background:transparent;color:inherit;cursor:pointer}
.dark .ic-think__cancel{border-color:#3f3f46}
@keyframes icAiBrain{0%,100%{transform:scale(1);filter:drop-shadow(0 0 0 rgba(255,255,255,0))}50%{transform:scale(1.15);filter:drop-shadow(0 0 6px rgba(255,255,255,.9))}}
@keyframes icAiAttn{0%{box-shadow:0 0 0 0 rgba(245,158,11,.7)}100%{box-shadow:0 0 0 12px rgba(245,158,11,0)}}
@keyframes icRing{0%{transform:scale(.9);opacity:1}100%{transform:scale(1.35);opacity:0}}
@keyframes icDot{0%,100%{transform:translateY(0);opacity:.4}50%{transform:translateY(-5px);opacity:1}}
@keyframes icFade{from{opacity:0}}
@media (prefers-reduced-motion:reduce){.ic-think *,.ic-think *::before,.ic-think *::after,.ic-ai.is-attn{animation:none!important}}
/* v138.2 — оформленный ответ InnCloud AI */
.ic-ai-text{font-size:.9rem;line-height:1.55}
.ic-ai-text p{margin:0 0 .6rem}.ic-ai-text p:last-child{margin-bottom:0}
.ic-ai-text ul{margin:.25rem 0 .75rem;padding:0;list-style:none;display:grid;gap:.45rem}
.ic-ai-text li{position:relative;padding:.5rem .75rem .5rem 2rem;border-radius:.75rem;background:linear-gradient(90deg,rgba(99,102,241,.08),rgba(20,184,166,.05))}
.ic-ai-text li::before{content:"✦";position:absolute;left:.75rem;top:.5rem;color:#6366f1}
.ic-ai-text b{font-weight:650;color:#4338ca}.dark .ic-ai-text b{color:#a5b4fc}
.ic-ai-text .is-warn{color:#b45309}

.choice-option small.choice-hint { color:var(--erp-muted); opacity:.85; }

.choice-chips { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
.choice-chip { display:inline-flex; flex-direction:column; min-width:84px; padding:3px 7px; border:1px solid var(--erp-border, rgba(127,127,127,.25)); border-radius:6px; line-height:1.15; }
.choice-chip em { font-style:normal; font-size:10px; color:var(--erp-muted); }
.choice-chip b { font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.choice-chip.is-empty b { color:var(--erp-muted); }
