/* Мобильная версия Nova Remote (nova-mobile.js). Включается классом body.nm-on */
body.nm-on .sidebar,
body.nm-on .main,
body.nm-on #sidebarBackdrop,
body.nm-on .sidebar-overlay { display: none !important; }
body.nm-on { overflow: hidden; }

#nmApp {
  --nm-bg: #0b0d14; --nm-card: #151926; --nm-card2: #1b2030; --nm-line: rgba(var(--nm-fg),.09);
  --nm-text: #eef1f7; --nm-mut: rgba(var(--nm-fg),.55); --nm-acc: #7c5cff; --nm-acc2: #38bdf8;
  --nm-good: #22c55e; --nm-bad: #ef4444; --nm-warn: #f59e0b;
  --nm-fg: 238,241,247; --nm-acc-rgb: 124,92,255; --nm-on-acc: #fff;
  --nm-neg: #fca5a5; --nm-pos: #86efac; --nm-amber: #fcd34d;
  display: none; position: fixed; inset: 0; z-index: 9000;
  flex-direction: column; background: var(--nm-bg); color: var(--nm-text);
  font-family: -apple-system, "Segoe UI", Roboto, system-ui, sans-serif; font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}
body.nm-on.app-ready #nmApp { display: flex; }
#nmApp *, #nmApp *::before, #nmApp *::after { box-sizing: border-box; }
#nmApp button { font: inherit; color: inherit; cursor: pointer; }

/* сброс общих стилей кнопок и полей менеджера внутри мобильной версии */
#nmApp button { height: auto; min-height: 0; margin: 0; padding: 0; line-height: 1.2; text-transform: none; letter-spacing: normal;
  box-shadow: none; background-image: none; width: auto; max-width: none; appearance: none; -webkit-appearance: none; }
#nmApp input, #nmApp textarea { height: auto; margin: 0; box-shadow: none; -webkit-appearance: none; appearance: none; }
#nmApp { top: 0; left: 0; right: 0; bottom: auto; height: 100vh; height: 100dvh; -webkit-text-size-adjust: 100%; }
/* верх */
#nmApp .nm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--nm-card); border-bottom: 1px solid var(--nm-line); }
#nmApp .nm-club { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 62%;
  background: transparent; border: 0; padding: 6px 4px; font-weight: 700; font-size: 16px; }
#nmApp .nm-club span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nmApp .nm-club small { opacity: .5; }
#nmApp .nm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nm-good); box-shadow: 0 0 8px rgba(34,197,94,.6); flex: none; }
#nmApp .nm-top-r { display: flex; align-items: center; gap: 8px; }
#nmApp .nm-ico { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--nm-line); background: var(--nm-card2); font-size: 18px; line-height: 1; }
#nmApp .nm-ico:disabled { opacity: .35; }
#nmApp .nm-pcbtn { height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(var(--nm-acc-rgb),.5);
  background: rgba(var(--nm-acc-rgb),.18); font-weight: 700; font-size: 14px; white-space: nowrap; }

/* тело */
#nmApp .nm-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px 18px; }
#nmApp .nm-foot { margin: 18px 4px 4px; text-align: center; color: var(--nm-mut); font-size: 12.5px; }
#nmApp .nm-foot a { color: var(--nm-acc2); }
#nmApp .nm-muted { color: var(--nm-mut); padding: 10px 2px; font-size: 14px; }
#nmApp .nm-hint { color: var(--nm-mut); font-size: 13px; margin: 2px 2px 12px; }

/* нижняя навигация */
#nmApp .nm-nav { display: flex; background: var(--nm-card); border-top: 1px solid var(--nm-line);
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); }
#nmApp .nm-nav button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: transparent; border: 0; padding: 6px 2px; border-radius: 12px; font-size: 11px; color: var(--nm-mut); }
#nmApp .nm-nav button.on { color: var(--nm-text); background: rgba(var(--nm-acc-rgb),.22); }
#nmApp .nm-nav-ic { font-size: 20px; line-height: 1.1; }
#nmApp .nm-badge { position: absolute; top: 2px; left: 54%; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--nm-bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }

/* карточки и плитки */
#nmApp .nm-hero { background: linear-gradient(135deg, rgba(var(--nm-acc-rgb),.35), rgba(56,189,248,.22)); border: 1px solid var(--nm-line);
  border-radius: 20px; padding: 16px 18px; margin-bottom: 12px; }
#nmApp .nm-hero-l { color: var(--nm-mut); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
#nmApp .nm-hero-v { font-size: 34px; font-weight: 800; margin: 4px 0 2px; letter-spacing: -.5px; }
#nmApp .nm-hero-s { color: var(--nm-mut); font-size: 13px; }
#nmApp .nm-hero-s.up { color: var(--nm-pos); } .nm-hero-s.down { color: var(--nm-neg); }
#nmApp .nm-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
#nmApp .nm-tile { background: var(--nm-card); border: 1px solid var(--nm-line); border-radius: 16px; padding: 12px 14px; }
#nmApp .nm-tile b { display: block; font-size: 24px; font-weight: 800; }
#nmApp .nm-tile b small { font-size: 14px; font-weight: 600; color: var(--nm-mut); }
#nmApp .nm-tile span { color: var(--nm-mut); font-size: 12.5px; }
#nmApp .nm-tile.warn b { color: var(--nm-warn); }
#nmApp .nm-card { background: var(--nm-card); border: 1px solid var(--nm-line); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
#nmApp .nm-card.flat { background: transparent; border: 0; padding: 6px 0; margin: 8px 0; }
#nmApp .nm-card-t { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--nm-mut); margin-bottom: 10px; }
#nmApp .nm-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--nm-line); }
#nmApp .nm-row:first-of-type { border-top: 0; }
#nmApp .nm-row b.neg { color: var(--nm-neg); }
#nmApp .nm-row.total { font-size: 17px; }
#nmApp .nm-row.total b { color: var(--nm-acc2); }
#nmApp .nm-bar { margin-bottom: 12px; }
#nmApp .nm-bar-h { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
#nmApp .nm-bar-t { height: 8px; border-radius: 4px; background: rgba(var(--nm-fg),.08); overflow: hidden; }
#nmApp .nm-bar-t i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--nm-acc), var(--nm-acc2)); }
#nmApp .nm-chart { display: flex; align-items: flex-end; gap: 3px; height: 130px; }
#nmApp .nm-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
#nmApp .nm-col i { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--nm-acc2), var(--nm-acc)); }
#nmApp .nm-col span { font-size: 9.5px; color: var(--nm-mut); margin-top: 4px; }
/* выручка по дням: подпись суммы над столбиком, столбик в своём контейнере, сегодняшний подсвечен */
#nmApp .nm-card-th { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#nmApp .nm-chart-days { height: 170px; gap: 4px; }
#nmApp .nm-chart-days .nm-col em { font-style: normal; font-size: 9px; color: var(--nm-mut); margin-bottom: 2px; white-space: nowrap; min-height: 11px; }
#nmApp .nm-chart-days .nm-col .bw { flex: 1; width: 100%; display: flex; align-items: flex-end; }
#nmApp .nm-chart-days .nm-col.today i { background: linear-gradient(180deg, #7dd3fc, #38bdf8); }
#nmApp .nm-chart-days .nm-col span { min-height: 12px; white-space: nowrap; }
#nmApp .nm-chart-sum { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--nm-mut); flex-wrap: wrap; }
#nmApp .nm-chart-sum b { color: var(--nm-fg, inherit); }
#nmApp .nm-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--nm-line); }
#nmApp .nm-line-n { overflow-wrap: anywhere; }
#nmApp .nm-line-q { color: var(--nm-mut); font-size: 13px; min-width: 32px; text-align: right; }

/* кнопки и поля */
#nmApp .nm-btn { min-height: 44px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--nm-line); background: var(--nm-card2); font-weight: 700; }
#nmApp .nm-btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
#nmApp .nm-btn.primary { background: var(--nm-acc); border-color: transparent; color: var(--nm-on-acc); }
#nmApp .nm-btn.danger { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.4); color: var(--nm-neg); }
#nmApp .nm-btn.wide { width: 100%; }
#nmApp .nm-btn:disabled { opacity: .5; }
#nmApp .nm-input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--nm-line);
  background: var(--nm-card2); color: var(--nm-text); font: inherit; }
#nmApp textarea.nm-input { resize: vertical; }
#nmApp .nm-datebar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
#nmApp .nm-datebar .nm-input { flex: 1; min-width: 0; text-align: center; }
#nmApp .nm-seg { display: flex; gap: 6px; background: var(--nm-card2); padding: 4px; border-radius: 14px; margin-bottom: 12px; }
#nmApp .nm-seg button { flex: 1; min-height: 38px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; font-size: 13.5px; color: var(--nm-mut); }
#nmApp .nm-seg button.on { background: var(--nm-acc); color: var(--nm-on-acc); }
#nmApp .nm-seg small { opacity: .8; }
#nmApp .nm-seg.sm { margin: 0; width: 190px; }
#nmApp .nm-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
#nmApp .nm-chips button { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--nm-line); background: var(--nm-card2); font-size: 13px; }
#nmApp .nm-chips button.on { background: var(--nm-acc); border-color: transparent; }

/* вход */
#nmApp .nm-login { max-width: 380px; margin: 8vh auto 0; display: flex; flex-direction: column; gap: 12px; }
#nmApp .nm-login-t { font-size: 20px; font-weight: 800; }
#nmApp .nm-login-s { color: var(--nm-mut); font-size: 13.5px; }
#nmApp .nm-login-e { color: var(--nm-neg); font-size: 13.5px; min-height: 18px; }

/* заглушки */
#nmApp .nm-empty { text-align: center; padding: 50px 20px; color: var(--nm-mut); display: flex; flex-direction: column; gap: 12px; align-items: center; }
#nmApp .nm-empty-ic { font-size: 40px; }
#nmApp .nm-skel { height: 96px; border-radius: 18px; margin-bottom: 12px; background: linear-gradient(90deg, var(--nm-card) 25%, var(--nm-card2) 50%, var(--nm-card) 75%); background-size: 200% 100%; animation: nm-sh 1.2s infinite; }
#nmApp .nm-skel.s { height: 64px; }
@keyframes nm-sh { to { background-position: -200% 0; } }

/* макет */
#nmApp .nm-maphead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
#nmApp .nm-legend { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--nm-mut); }
#nmApp .nm-legend i { width: 9px; height: 9px; border-radius: 50%; margin-left: 8px; }
#nmApp .nm-legend i:first-child { margin-left: 0; }
#nmApp .nm-legend .free, #nmApp .nm-pill.free { background: var(--nm-good); }
#nmApp .nm-legend .busy, #nmApp .nm-pill.busy { background: var(--nm-bad); }
#nmApp .nm-legend .res, #nmApp .nm-pill.res { background: var(--nm-warn); }
#nmApp .nm-legend .blocked, #nmApp .nm-pill.blocked { background: #ec4899; }
#nmApp .nm-pill.maint { background: #a855f7; }
#nmApp .nm-mapvp { position: relative; height: calc(100vh - 250px); height: calc(100dvh - 250px); min-height: 300px; border-radius: 18px; overflow: hidden;
  background: var(--nm-card); border: 1px solid var(--nm-line); touch-action: none; user-select: none; -webkit-user-select: none; }
#nmApp .nm-mapcv { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#nmApp .nm-mapctl { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
#nmApp .nm-mapctl button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--nm-line); background: var(--nm-card); font-size: 20px; font-weight: 700; }
#nmApp .nm-tile-pc { position: absolute; border-radius: 10px; border: 1.5px solid; padding: 3px 2px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1px; }
#nmApp .nm-pc-n { font-weight: 800; font-size: 14px; line-height: 1.1; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#nmApp .nm-pc-p { font-size: 10px; opacity: .85; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#nmApp .nm-pc-s { font-size: 11.5px; font-weight: 700; }
#nmApp .nm-tile-pc.free { border-color: rgba(34,197,94,.75); background: rgba(34,197,94,.16); } .nm-tile-pc.free .nm-pc-s { color: var(--nm-pos); }
#nmApp .nm-tile-pc.busy { border-color: rgba(239,68,68,.8); background: rgba(239,68,68,.18); } .nm-tile-pc.busy .nm-pc-s { color: var(--nm-neg); }
#nmApp .nm-tile-pc.res { border-color: rgba(245,158,11,.85); background: rgba(245,158,11,.18); } .nm-tile-pc.res .nm-pc-s { color: var(--nm-amber); }
#nmApp .nm-tile-pc.blocked { border-color: #ec4899; background: rgba(236,72,153,.28); } #nmApp .nm-tile-pc.blocked .nm-pc-s { color: #f9a8d4; }
#nmApp .nm-tile-pc.maint { border-color: rgba(168,85,247,.8); background: rgba(168,85,247,.18); }
/* ПК в Admin mode «горит» синим: синяя заливка, рамка и мягко пульсирующее свечение поверх цвета статуса */
#nmApp .nm-tile-pc.adm { border-color: #38bdf8; background: rgba(56,189,248,.30); box-shadow: 0 0 0 2px rgba(56,189,248,.95), 0 0 16px 3px rgba(56,189,248,.55); animation: nm-adm 1.8s ease-in-out infinite; }
#nmApp .nm-tile-pc.adm .nm-pc-n { color: #e0f2fe; }
#nmApp .nm-tile-pc.adm .nm-pc-s, #nmApp .nm-tile-pc.adm .nm-pc-p { color: #bae6fd; }
@keyframes nm-adm { 50% { box-shadow: 0 0 0 2px #7dd3fc, 0 0 26px 8px rgba(56,189,248,.8); } }
@media (prefers-reduced-motion: reduce) { #nmApp .nm-tile-pc.adm { animation: none; } }
#nmApp .nm-hostlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
#nmApp .nm-host { text-align: left; background: var(--nm-card); border: 1px solid var(--nm-line); border-left: 4px solid var(--nm-good); border-radius: 14px; padding: 10px 12px; }
#nmApp .nm-host.busy { border-left-color: var(--nm-bad); } .nm-host.res { border-left-color: var(--nm-warn); }
#nmApp .nm-host.blocked { border-left-color: #ec4899; background: rgba(236,72,153,.12); } .nm-host.maint { border-left-color: #a855f7; }
#nmApp .nm-host-n { font-weight: 800; } .nm-host-n em { font-style: normal; font-size: 10px; color: #e0f2fe; background: rgba(56,189,248,.35); border: 1px solid #38bdf8; border-radius: 6px; padding: 0 4px; margin-left: 4px; }
#nmApp .nm-host-s { color: var(--nm-mut); font-size: 12.5px; margin-top: 2px; }
#nmApp .nm-host-p { font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }

/* нижняя шторка */
#nmApp .nm-sheet-bd { position: fixed; inset: 0; z-index: 9500; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
#nmApp .nm-sheet { width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; background: var(--nm-card, #151926); color: var(--nm-text);
  border-radius: 22px 22px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); animation: nm-up .18s ease-out; }
@keyframes nm-up { from { transform: translateY(40px); opacity: 0; } }
#nmApp .nm-sheet-grip { width: 42px; height: 4px; border-radius: 2px; background: rgba(var(--nm-fg),.25); margin: 0 auto 12px; }
#nmApp .nm-sh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
#nmApp .nm-sh-title { font-size: 19px; font-weight: 800; }
#nmApp .nm-sh-text { color: rgba(var(--nm-fg),.7); margin: 8px 0 14px; }
#nmApp .nm-sh-actions { display: flex; gap: 10px; margin-top: 16px; }
#nmApp .nm-sh-actions .nm-btn { flex: 1; }
#nmApp .nm-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: #fff; }
#nmApp .nm-kv > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(var(--nm-fg),.09); }
#nmApp .nm-kv > div > span { color: rgba(var(--nm-fg),.55); font-size: 13.5px; }
#nmApp .nm-kv .amber { color: var(--nm-amber); }
#nmApp .nm-kv small { color: rgba(var(--nm-fg),.6); }

/* заявки */
#nmApp .nm-req { background: var(--nm-card); border: 1px solid var(--nm-line); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
#nmApp .nm-req-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
#nmApp .nm-req-h span { color: var(--nm-mut); font-size: 12.5px; white-space: nowrap; }
#nmApp .nm-req-t { margin-top: 6px; font-size: 15.5px; }
#nmApp .nm-req-r { margin-top: 6px; color: rgba(var(--nm-fg),.78); font-size: 14px; overflow-wrap: anywhere; }
#nmApp .nm-req-m { margin-top: 6px; color: var(--nm-mut); font-size: 12.5px; }
#nmApp .nm-req-a { display: flex; gap: 10px; margin-top: 12px; }
#nmApp .nm-req-a .nm-btn { flex: 1; }

/* Admin mode */
#nmApp .nm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#nmApp .nm-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px;
  background: var(--nm-card); border: 1px solid var(--nm-line); border-radius: 14px; padding: 8px 4px; }
#nmApp .nm-chip b { font-size: 15px; }
#nmApp .nm-chip small { color: var(--nm-acc2); font-size: 11px; }
#nmApp .nm-chip.on { border-color: var(--nm-acc2); background: rgba(56,189,248,.14); }

/* прочее */
#nmApp .nm-toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9700;
  background: #22c55e; color: #04210f; padding: 11px 18px; border-radius: 14px; font-weight: 700; max-width: 90vw; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
#nmApp .nm-toast.bad { background: #ef4444; color: #fff; }
.nm-tomobile { position: fixed; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 9100;
  height: 42px; padding: 0 16px; border-radius: 21px; border: 1px solid rgba(var(--nm-acc-rgb),.6);
  background: rgba(var(--nm-acc-rgb),.92); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
body.nm-on .nm-tomobile { display: none; }

/* кнопки управления макетом и нижняя навигация: ровно по центру, без обрезки подписей */
#nmApp .nm-mapctl button { display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; font-size: 22px; }
#nmApp .nm-nav button { min-height: 54px; justify-content: center; overflow: visible; }
#nmApp .nm-nav button span:last-of-type { font-size: 11px; line-height: 1.2; white-space: nowrap; }
#nmApp .nm-ico { display: flex; align-items: center; justify-content: center; padding: 0; }
#nmApp .nm-club, #nmApp .nm-pcbtn { display: flex; align-items: center; }
#nmApp .nm-host { display: block; width: 100%; }
#nmApp .nm-host-s, #nmApp .nm-host-p { display: block; }
#nmApp .nm-chips button { white-space: nowrap; }
#nmApp .nm-seg button { padding: 0 8px; }
#nmApp .nm-btn { display: flex; align-items: center; justify-content: center; min-height: 46px; }
#nmApp .nm-chip { display: flex; }
.nm-tomobile { height: 42px !important; line-height: 1 !important; padding: 0 16px !important; width: auto !important; }

/* Питание ПК и диспетчер задач в карточке ПК */
#nmApp .nm-pw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
#nmApp .nm-pw-grid .wide { grid-column: 1 / -1; }
#nmApp .nm-tm-body { margin-top: 12px; }
#nmApp .nm-tm-list { max-height: 46vh; overflow-y: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
#nmApp .nm-tm-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--nm-card2); border: 1px solid var(--nm-line); }
#nmApp .nm-tm-i { min-width: 0; }
#nmApp .nm-tm-i b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nmApp .nm-tm-i b i { font-style: normal; opacity: .6; font-weight: 600; }
#nmApp .nm-tm-i small { display: block; color: rgba(var(--nm-fg),.55); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nmApp .nm-tm-m { font-size: 12.5px; color: rgba(var(--nm-fg),.7); white-space: nowrap; }
#nmApp .nm-tm-row .nm-btn { min-height: 36px; padding: 0 12px; }

/* Режим «приложение» (добавлено на главный экран): без рамок браузера, на весь экран */
@media (display-mode: standalone) {
  html, body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
  body { -webkit-user-select: none; user-select: none; }
  input, textarea { -webkit-user-select: text; user-select: text; }
  #nmApp .nm-nav { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
}

/* Клиенты (мобильная версия) */
#nmApp .nm-usr-bar { position: sticky; top: 0; z-index: 3; padding: 4px 0 10px; background: var(--nm-bg, transparent); }
#nmApp .nm-usr { display: block; width: 100%; text-align: left; margin-bottom: 8px; padding: 12px 14px; border-radius: 14px; background: var(--nm-card); border: 1px solid var(--nm-line); color: inherit; }
#nmApp .nm-usr-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
#nmApp .nm-usr-s { margin-top: 2px; font-size: 13px; color: rgba(var(--nm-fg),.6); }
#nmApp .nm-usr-m { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#nmApp .nm-usr-m span { padding: 3px 9px; border-radius: 999px; font-size: 12px; background: rgba(var(--nm-fg),.07); border: 1px solid var(--nm-line); }
#nmApp .nm-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 2px 16px; font-size: 13px; color: rgba(var(--nm-fg),.7); }
#nmApp .nm-pager .nm-btn { min-width: 52px; }
#nmApp .nm-usr-kv > div { grid-template-columns: 96px 1fr; }
#nmApp .nm-form { display: grid; gap: 10px; margin-top: 12px; max-height: 58vh; overflow-y: auto; }
#nmApp .nm-form label { display: grid; gap: 4px; font-size: 12.5px; color: rgba(var(--nm-fg),.65); }

/* Подсказка про уведомления и стрелка «Нажмите Разрешить» */
#nmApp .nm-push-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 12px 0; padding: 10px 12px; border-radius: 14px;
  background: rgba(var(--nm-acc-rgb),.16); border: 1px solid rgba(var(--nm-acc-rgb),.45); font-size: 13.5px; line-height: 1.3; }
#nmApp .nm-push-hint.warn { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); }
#nmApp .nm-push-hint.info { background: rgba(var(--nm-fg),.07); border-color: var(--nm-line); }
#nmApp .nm-push-hint .nm-btn { flex: none; }
#nmApp .nm-push-hint .nm-ph-x { flex: none; background: none; border: 0; color: inherit; font-size: 18px; padding: 0 4px; }
.nm-push-arrow { position: fixed; left: 0; right: 0; z-index: 99990; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; }
.nm-push-arrow.bottom { bottom: 120px; }
.nm-push-arrow.center { top: 58%; }
.nm-push-arrow.top { top: 90px; align-items: flex-start; padding-left: 24px; flex-direction: column-reverse; }
.nm-push-arrow .nm-pa-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: 14px; background: #7c3aed; box-shadow: 0 10px 30px rgba(0,0,0,.5); text-align: center; }
.nm-push-arrow .nm-pa-card span { font-size: 12px; opacity: .85; }
.nm-push-arrow i { font-style: normal; font-size: 40px; line-height: 1; text-shadow: 0 4px 14px rgba(0,0,0,.6); animation: nmPaBounce .9s ease-in-out infinite; }
@keyframes nmPaBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
#nmApp .nm-rc { padding: 10px 0; border-top: 1px solid var(--nm-line); cursor: pointer; }
#nmApp .nm-rc:first-child { border-top: 0; }
#nmApp .nm-rc-top { display: flex; gap: 10px; align-items: baseline; }
#nmApp .nm-rc-t { color: var(--nm-mut); font-size: 13px; min-width: 44px; }
#nmApp .nm-rc-c { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
#nmApp .nm-rc-a.pos { color: var(--nm-pos); }
#nmApp .nm-rc-s { margin-top: 3px; font-size: 13px; color: var(--nm-mut); overflow-wrap: anywhere; }
#nmApp .nm-rc-d { margin-top: 6px; font-size: 12.5px; color: var(--nm-mut); display: grid; gap: 2px; }
#nmApp .nm-rc.void .nm-rc-a { text-decoration: line-through; opacity: .5; }
#nmApp .nm-rc-methods { flex-wrap: wrap; }
#nmApp .nm-rc-methods button { flex: 0 1 auto; padding: 0 12px; }

/* ── Темы мобильной версии: #nmApp[data-theme="…"]. По умолчанию — тёмная фиолетовая (как раньше) ─────────── */
#nmApp[data-theme="ocean"] {
  --nm-bg:#070d16; --nm-card:#0f1a29; --nm-card2:#152338; --nm-text:#eaf2fb; --nm-fg:234,242,251; --nm-mut:rgba(234,242,251,.55);
  --nm-acc:#3b82f6; --nm-acc-rgb:59,130,246; --nm-acc2:#22d3ee; --nm-on-acc:#fff;
}
#nmApp[data-theme="lime"] {
  --nm-bg:#090d07; --nm-card:#121a0f; --nm-card2:#192413; --nm-text:#eef7e8; --nm-fg:238,247,232; --nm-mut:rgba(238,247,232,.55);
  --nm-acc:#84cc16; --nm-acc-rgb:132,204,22; --nm-acc2:#22d3ee; --nm-on-acc:#0b1a04;
}
#nmApp[data-theme="red"] {
  --nm-bg:#0d0808; --nm-card:#1a1010; --nm-card2:#251717; --nm-text:#f8eeee; --nm-fg:248,238,238; --nm-mut:rgba(248,238,238,.55);
  --nm-acc:#ef4444; --nm-acc-rgb:239,68,68; --nm-acc2:#fb923c; --nm-on-acc:#fff;
}
#nmApp[data-theme="light-purple"] {
  --nm-bg:#f1ecff; --nm-card:#ffffff; --nm-card2:#f3edff; --nm-text:#1f0b3d; --nm-fg:31,11,61; --nm-mut:rgba(31,11,61,.6);
  --nm-line:rgba(76,29,149,.14); --nm-acc:#7c3aed; --nm-acc-rgb:124,58,237; --nm-acc2:#2563eb; --nm-on-acc:#fff;
  --nm-good:#16a34a; --nm-bad:#dc2626; --nm-warn:#d97706; --nm-neg:#b91c1c; --nm-pos:#15803d; --nm-amber:#a16207;
}
#nmApp[data-theme="silver"] {
  --nm-bg:#eceff3; --nm-card:#ffffff; --nm-card2:#eef1f5; --nm-text:#18232d; --nm-fg:24,35,45; --nm-mut:rgba(24,35,45,.6);
  --nm-line:rgba(40,60,80,.14); --nm-acc:#475569; --nm-acc-rgb:71,85,105; --nm-acc2:#0ea5e9; --nm-on-acc:#fff;
  --nm-good:#16a34a; --nm-bad:#dc2626; --nm-warn:#d97706; --nm-neg:#b91c1c; --nm-pos:#15803d; --nm-amber:#a16207;
}
/* светлые темы: тени мягче, плитки ПК и карточки читаются на светлом */
#nmApp[data-theme="light-purple"] .nm-card, #nmApp[data-theme="silver"] .nm-card { box-shadow: 0 1px 6px rgba(30,20,60,.08); }
#nmApp[data-theme="light-purple"] .nm-tile-pc .nm-pc-n, #nmApp[data-theme="silver"] .nm-tile-pc .nm-pc-n { color: var(--nm-text); }
#nmApp .nm-theme-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 8px; border-radius: 14px;
  border: 1px solid var(--nm-line); background: var(--nm-card2); text-align: left; font-weight: 600; }
#nmApp .nm-theme-opt.on { border-color: var(--nm-acc); box-shadow: 0 0 0 1px var(--nm-acc) inset; }
#nmApp .nm-theme-dots { display: flex; gap: 4px; flex: none; }
#nmApp .nm-theme-dots i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(128,128,128,.4); }
#nmApp .nm-theme-opt small { margin-left: auto; color: var(--nm-mut); font-weight: 500; }

/* фото накладных и чеков расходов */
#nmApp .nm-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
#nmApp .nm-photo-th { width: 84px; height: 84px; border-radius: 12px; border: 1px solid var(--nm-line); background: var(--nm-card2); overflow: hidden; padding: 0; display: grid; place-items: center; color: var(--nm-mut); }
#nmApp .nm-photo-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nm-photo-view { position: fixed; inset: 0; z-index: 9800; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 12px; }
.nm-photo-view img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.nm-photo-view .nm-photo-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 18px; }

/* ── Касса (мини-POS) ─────────────────────────────────────────────────────── */
#nmApp .nm-posnote { margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.4); color: var(--nm-amber); }
#nmApp .nm-posnote.bad { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); color: var(--nm-neg); margin: 10px 0; }
#nmApp .nm-posclient { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; margin-bottom: 12px;
  padding: 12px 14px; border-radius: 16px; border: 1px solid var(--nm-line); background: var(--nm-card); }
#nmApp .nm-posclient span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#nmApp .nm-posclient b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nmApp .nm-posclient small { color: var(--nm-mut); font-size: 12.5px; }
#nmApp .nm-posclient i { font-style: normal; color: var(--nm-acc2); font-size: 13px; font-weight: 700; flex: none; }
#nmApp .nm-posit { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; margin-bottom: 8px;
  min-height: 58px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--nm-line); background: var(--nm-card); }
#nmApp .nm-posit:active { background: var(--nm-card2); }
#nmApp .nm-posit span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#nmApp .nm-posit b { font-weight: 700; overflow-wrap: anywhere; }
#nmApp .nm-posit small { color: var(--nm-mut); font-size: 12.5px; }
#nmApp .nm-posit em { font-style: normal; font-weight: 800; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
#nmApp .nm-posit u { text-decoration: none; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--nm-acc); color: var(--nm-on-acc); }
#nmApp .nm-posbar { position: sticky; bottom: -6px; z-index: 5; display: flex; gap: 10px; margin: 12px -4px -6px; padding: 10px 4px 6px; background: linear-gradient(180deg, transparent, var(--nm-bg) 28%); }
#nmApp .nm-posbar .nm-btn { min-height: 52px; font-size: 16px; }
#nmApp .nm-posbar .nm-btn.primary { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#nmApp .nm-pcl { margin: 10px 0; max-height: 46vh; overflow-y: auto; }
#nmApp .nm-cart { margin: 10px 0; }
#nmApp .nm-cartrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--nm-line); }
#nmApp .nm-cartrow > span { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#nmApp .nm-cartrow small { color: var(--nm-mut); font-size: 12.5px; }
#nmApp .nm-qty { display: flex; align-items: center; gap: 4px; }
#nmApp .nm-qty button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--nm-line); background: var(--nm-card2); font-size: 20px; font-weight: 700; }
#nmApp .nm-qty b { min-width: 24px; text-align: center; }
#nmApp .nm-x { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--nm-mut); font-size: 16px; }
#nmApp .nm-paytotal { font-size: 38px; font-weight: 800; letter-spacing: -.5px; text-align: center; margin: 8px 0 10px; }
#nmApp .nm-meth { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; margin-bottom: 8px;
  min-height: 60px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--nm-line); background: var(--nm-card2); }
#nmApp .nm-meth.term { border-color: rgba(var(--nm-acc-rgb),.5); background: rgba(var(--nm-acc-rgb),.14); }
#nmApp .nm-meth span { display: flex; flex-direction: column; gap: 2px; }
#nmApp .nm-meth small { color: var(--nm-mut); font-size: 12.5px; }
#nmApp .nm-meth i { font-style: normal; font-size: 22px; opacity: .6; }
#nmApp .nm-meth:disabled { opacity: .45; }
#nmApp .nm-change { margin: 10px 0 2px; font-size: 15px; text-align: center; min-height: 22px; }
#nmApp .nm-neg { color: var(--nm-neg); }
#nmApp .nm-tp-hint { text-align: center; color: var(--nm-mut); font-size: 14.5px; line-height: 1.5; min-height: 44px; margin: 4px 0 6px; }
#nmApp .nm-ok-ic { width: 64px; height: 64px; margin: 6px auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 800; background: rgba(34,197,94,.18); color: var(--nm-pos); }

/* ── Касса: режимы, зависшие, возвраты; «Система» на дашборде ── */
#nmApp .nm-posmode small { display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 4px; border-radius: 9px; background: var(--nm-bad); color: #fff; font-weight: 800; opacity: 1; }
#nmApp .nm-posmode button.on small { background: rgba(255,255,255,.28); }
#nmApp .nm-wrapbtns { display: flex; flex-wrap: wrap; gap: 8px; }
#nmApp .nm-wrapbtns .nm-btn { flex: 1 1 140px; min-height: 40px; font-size: 13.5px; }
#nmApp .hdot { display: inline-block; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #7b8494; flex: none; }
#nmApp .hdot.ok { background: #3ddc84; box-shadow: 0 0 8px rgba(61,220,132,.55); }
#nmApp .hdot.warn { background: #f5b301; box-shadow: 0 0 8px rgba(245,179,1,.5); }
#nmApp .hdot.bad { background: #ff5252; box-shadow: 0 0 10px rgba(255,82,82,.6); }
#nmApp .nm-health { padding: 12px 14px; }
#nmApp .nm-health.bad { border-color: rgba(255,82,82,.55); background: rgba(255,82,82,.08); }
#nmApp .nm-health.warn { border-color: rgba(245,179,1,.45); }
#nmApp .nm-hrow { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14px; }
#nmApp .nm-hrow small { display: block; color: var(--nm-mut); font-size: 12.5px; margin-top: 2px; }
/* подвкладки (Касса | Чеки, Макет | Клиенты) */
#nmApp .nm-sub { display: none; padding: 8px 12px 0; }
#nmApp .nm-sub.on { display: block; }
#nmApp .nm-sub .nm-seg { margin-bottom: 0; }
#nmApp .nm-ico.on { background: var(--nm-acc); border-color: transparent; }
#nmApp .nm-top { gap: 6px; }
#nmApp .nm-club { min-width: 0; flex: 1 1 auto; }
#nmApp .nm-club span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#nmApp .nm-top-r { flex: none; gap: 6px; }
#nmApp .nm-ico { width: 36px; height: 36px; }
