/*
 * Noqta admin — тема по шаблону NexStore (Templates/noqtaMAIN).
 * Подключается ПОСЛЕ panel.css и перекрывает его: каркас (сайдбар во всю высоту +
 * верхняя панель), меню, карточки, таблицы, формы, бейджи. Палитра — токены ниже.
 */
:root {
  --nq-primary: #14806e;
  --nq-primary-dark: #0f6b5c;
  --nq-primary-light: #7ccdcb;
  --nq-primary-50: #e8f5f3;
  --nq-primary-100: #cdeae7;
  --nq-success: #10b981;
  --nq-warning: #f59e0b;
  --nq-danger: #ef4444;
  --nq-info: #3b82f6;
  --nq-bg: #f9fafb;
  --nq-surface: #ffffff;
  --nq-border: #e5e7eb;
  --nq-border-soft: #f3f4f6;
  --nq-text: #111827;
  --nq-text-2: #374151;
  --nq-muted: #6b7280;
  --nq-faint: #9ca3af;
  --nq-radius-sm: 6px;
  --nq-radius-md: 10px;
  --nq-radius-lg: 14px;
  --nq-radius-xl: 20px;
  --nq-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .07), 0 2px 4px -2px rgba(0, 0, 0, .05);
  --nq-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .08), 0 4px 6px -4px rgba(0, 0, 0, .05);
  --nq-sidebar-w: 248px;
  --nq-topbar-h: 60px;
  --nq-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nq-font-display: 'Outfit', 'Inter', system-ui, sans-serif;
}

html, body {
  background: var(--nq-bg); }

body {
  font-family: var(--nq-font);
  color: var(--nq-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; }

/* Scrollbar как в шаблоне */
.nq-shell ::-webkit-scrollbar { width: 6px; height: 6px; }
.nq-shell ::-webkit-scrollbar-track { background: transparent; }
.nq-shell ::-webkit-scrollbar-thumb { background: var(--nq-border-strong,#d1d5db); border-radius: 3px; }
.nq-shell ::-webkit-scrollbar-thumb:hover { background: var(--nq-faint,#9ca3af); }

/* ================================================================ */
/* Каркас                                                            */
/* ================================================================ */
.panel-page.nq-shell {
  display: flex;
  min-height: 100vh;
  background: var(--nq-bg); }

.nq-sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 var(--nq-sidebar-w);
  width: var(--nq-sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--nq-surface);
  border-right: 1px solid var(--nq-border);
  z-index: 40; }

.nq-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--nq-topbar-h);
  padding: 0 18px;
  border-bottom: 1px solid var(--nq-border);
  text-decoration: none; }
  .nq-brand:hover { text-decoration: none; }
  .nq-brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--nq-primary) 0%, var(--nq-primary-dark) 100%);
    box-shadow: 0 4px 10px -2px rgba(20, 128, 110, .45);
    display: flex;
    align-items: center;
    justify-content: center; }
    .nq-brand-mark img {
      width: 19px;
      height: 19px;
      display: block; }
  .nq-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15; }
  .nq-brand-name {
    font-family: var(--nq-font-display);
    font-weight: 700;
    font-size: 17px;
    color: var(--nq-text);
    letter-spacing: -.01em; }
  .nq-brand-sub {
    font-family: var(--nq-font);
    font-size: 10.5px;
    color: var(--nq-muted); }

.nq-sidebar-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 10px 18px; }

.nq-sidebar-foot {
  border-top: 1px solid var(--nq-border);
  padding: 10px; }

.nq-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s; }
  .nq-user-card:hover {
    background: var(--nq-subtle,#f3f4f6);
    text-decoration: none; }
  .nq-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    line-height: 1.25; }
  .nq-user-phone {
    font-family: var(--nq-font);
    font-weight: 600;
    font-size: 12.5px;
    color: var(--nq-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; }
  .nq-user-role {
    font-family: var(--nq-font);
    font-size: 11px;
    color: var(--nq-muted); }
  .nq-user-exit {
    width: 16px;
    height: 16px;
    color: var(--nq-faint);
    flex: 0 0 auto; }
  .nq-user-card:hover .nq-user-exit { color: var(--nq-danger); }

.nq-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--nq-primary-50);
  color: var(--nq-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center; }
  .nq-avatar svg { width: 17px; height: 17px; }
  .nq-avatar-sm {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    background: var(--nq-primary);
    color: #fff; }
  .nq-avatar-sm svg { width: 15px; height: 15px; }

.nq-backdrop { display: none; }

.nq-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column; }

/* ---------------- Верхняя панель ---------------- */
.panel-header.nq-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--nq-topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--nq-border);
  box-shadow: none; }

.nq-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--nq-border);
  background: var(--nq-surface,#fff);
  border-radius: 8px;
  color: var(--nq-text-2);
  cursor: pointer;
  transition: background .15s;
  flex: 0 0 auto; }
  .nq-icon-btn:hover { background: var(--nq-subtle,#f3f4f6); }
  .nq-icon-btn svg { width: 17px; height: 17px; }
.nq-burger { display: none; }

.nq-crumbs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden; }
  .nq-crumb-root {
    font-family: var(--nq-font);
    font-size: 12.5px;
    color: var(--nq-faint);
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40%; }
  .nq-crumb-sep {
    color: var(--nq-border-strong,#d1d5db);
    font-size: 13px; }
  .nq-crumb-current {
    font-family: var(--nq-font);
    font-weight: 600;
    font-size: 14.5px;
    color: var(--nq-text);
    overflow: hidden;
    text-overflow: ellipsis; }

.nq-topbar .panel-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto; }

/* Сброс старых «оранжевых кнопок» шапки */
.nq-topbar .panel-user a {
  border: none;
  padding: 0;
  border-radius: 0;
  font-family: var(--nq-font);
  background: none; }
  .nq-topbar .panel-user a:hover { background: none; }

/* Переключатель языка — сегменты */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--nq-subtle,#f3f4f6);
  border-radius: 9px; }
  .lang-switch a,
  .nq-topbar .panel-user .lang-switch a {
    font-family: var(--nq-font);
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: .02em;
    color: var(--nq-muted);
    padding: 5px 9px;
    border-radius: 7px;
    text-decoration: none;
    border: none;
    transition: all .15s; }
  .lang-switch a:hover,
  .nq-topbar .panel-user .lang-switch a:hover {
    color: var(--nq-text);
    background: transparent; }
  .lang-switch a.active,
  .nq-topbar .panel-user .lang-switch a.active {
    font-family: var(--nq-font);
    color: var(--nq-text);
    background: var(--nq-surface,#fff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* Переключатель точки */
.nq-topbar .header-branch-switch-toggle {
  height: 36px;
  gap: 7px;
  border: 1px solid var(--nq-border);
  border-radius: 8px;
  padding: 0 11px;
  font-family: var(--nq-font);
  font-weight: 500;
  font-size: 13px;
  color: var(--nq-text-2);
  background: var(--nq-surface,#fff);
  max-width: 230px;
  transition: background .15s; }
  .nq-topbar .header-branch-switch-toggle:hover { background: var(--nq-bg,#f9fafb); }
  .nq-topbar .header-branch-switch-toggle > svg:first-child { color: var(--nq-primary); flex: 0 0 auto; }
.nq-chevron { color: var(--nq-faint); flex: 0 0 auto; }

.nq-topbar .header-branch-switch-menu,
.nq-dropdown {
  border: 1px solid var(--nq-border);
  border-radius: 12px;
  box-shadow: var(--nq-shadow-lg);
  padding: 6px; }
.nq-topbar .panel-user .header-branch-switch-menu a {
  font-family: var(--nq-font);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 7px; }
  .nq-topbar .panel-user .header-branch-switch-menu a.active {
    font-family: var(--nq-font);
    font-weight: 600;
    color: var(--nq-primary-dark);
    background: var(--nq-primary-50); }

/* Меню пользователя */
.nq-user-menu { position: relative; }
.nq-user-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px 0 5px;
  border: none;
  background: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s; }
  .nq-user-toggle:hover { background: var(--nq-subtle,#f3f4f6); }
  .nq-user-toggle-phone {
    font-family: var(--nq-font);
    font-weight: 600;
    font-size: 13px;
    color: var(--nq-text); }
.nq-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--nq-surface,#fff);
  z-index: 50; }
  .nq-user-menu.open .nq-dropdown { display: block; }
  .nq-dropdown-head {
    font-family: var(--nq-font);
    font-size: 12px;
    color: var(--nq-muted);
    padding: 8px 10px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--nq-border-soft); }
  .nq-topbar .panel-user .nq-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    font-family: var(--nq-font);
    font-weight: 500;
    font-size: 13px;
    color: var(--nq-text-2);
    text-decoration: none; }
    .nq-topbar .panel-user .nq-dropdown a svg { width: 16px; height: 16px; color: var(--nq-faint); }
    .nq-topbar .panel-user .nq-dropdown a:hover { background: var(--nq-subtle,#f3f4f6); color: var(--nq-text); }
    .nq-topbar .panel-user .nq-dropdown a.nq-dropdown-danger:hover { background: #fef2f2; color: #dc2626; }
    .nq-topbar .panel-user .nq-dropdown a.nq-dropdown-danger:hover svg { color: #dc2626; }

/* Кнопка табеля (вход сотрудника) */
.nq-topbar .panel-user .timeclock-toggle-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-family: var(--nq-font);
  font-weight: 500;
  font-size: 13px;
  border: 1px solid var(--nq-success);
  color: #047857;
  background: #ecfdf5; }
  .nq-topbar .panel-user .timeclock-toggle-btn:hover { background: var(--nq-success); color: #fff; }
  .nq-topbar .panel-user .timeclock-toggle-btn.is-active { background: var(--nq-danger); border-color: var(--nq-danger); color: #fff; }

/* ---------------- Контент ---------------- */
.nq-shell .panel-body {
  flex: 1 1 auto;
  padding: 24px 24px 48px; }
.nq-shell .panel-container {
  max-width: 1480px;
  margin: 0;
  padding: 0; }
.nq-shell .panel-layout {
  display: block; }
.nq-shell .panel-content { min-width: 0; }

.nq-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px; }
.nq-page-title,
.nq-shell .panel-body h1 {
  font-family: var(--nq-font);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.015em;
  color: var(--nq-text);
  margin: 0 0 2px; }
.nq-shell .panel-body .panel-lead {
  font-family: var(--nq-font);
  font-size: 13.5px;
  color: var(--nq-muted);
  margin-bottom: 20px; }

/* ================================================================ */
/* Боковое меню                                                      */
/* ================================================================ */
.nq-sidebar .panel-sidebar {
  position: static;
  flex: none;
  width: 100%;
  display: block;
  gap: 0; }
.nq-sidebar .panel-nav-mode {
  display: flex;
  flex-direction: column;
  gap: 2px; }
  .nq-sidebar .panel-nav-mode[hidden] { display: none; }

.nq-sidebar .panel-nav-label {
  font-family: var(--nq-font);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--nq-faint);
  padding: 0 12px;
  margin: 0 0 4px; }
  .nq-sidebar .panel-nav-label-spaced { margin-top: 16px; }
.nq-sidebar .panel-nav-divider {
  height: 1px;
  background: var(--nq-border-soft);
  margin: 12px 12px 14px; }

.nq-sidebar .panel-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--nq-font);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--nq-text-2,#374151);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .15s, color .15s; }
  .nq-sidebar .panel-nav-item:hover {
    background: var(--nq-subtle,#f3f4f6);
    color: var(--nq-text); }
  .nq-sidebar .panel-nav-item.active {
    background: var(--nq-primary-50);
    color: var(--nq-primary-dark);
    font-weight: 600; }
.nq-sidebar .panel-nav-icon {
  width: 18px;
  height: 18px;
  opacity: 1;
  color: var(--nq-faint);
  stroke-width: 1.8;
  transition: color .15s; }
  .nq-sidebar .panel-nav-item:hover .panel-nav-icon { color: var(--nq-muted,#6b7280); }
  .nq-sidebar .panel-nav-item.active .panel-nav-icon { color: var(--nq-primary); }

.nq-sidebar .panel-nav-item.soon { color: #c0c4cc; }
  .nq-sidebar .panel-nav-item.soon .panel-nav-icon { color: var(--nq-border-strong,#d1d5db); }
.nq-sidebar .panel-nav-soon-badge {
  font-family: var(--nq-font);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: .05em;
  color: #c2410c;
  background: #ffedd5;
  padding: 2px 7px; }

.nq-sidebar .panel-nav-sublist {
  margin: 2px 0 4px 21px;
  padding: 2px 0 2px 10px;
  border-left: 1px solid var(--nq-border);
  gap: 1px; }
.nq-sidebar .panel-nav-subitem {
  font-family: var(--nq-font);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--nq-muted); }
  .nq-sidebar .panel-nav-subitem:hover { background: var(--nq-subtle,#f3f4f6); color: var(--nq-text); }
  .nq-sidebar .panel-nav-subitem.active {
    background: var(--nq-primary-50);
    color: var(--nq-primary-dark);
    font-weight: 600; }

/* Режим филиала */
.nq-sidebar .panel-nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px dashed var(--nq-border);
  font-family: var(--nq-font);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--nq-muted);
  white-space: nowrap; }
  .nq-sidebar .panel-nav-back:hover {
    text-decoration: none;
    color: var(--nq-primary-dark);
    border-color: var(--nq-primary-light);
    background: var(--nq-primary-50); }
.nq-sidebar .panel-nav-branch-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 14px;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--nq-primary) 0%, var(--nq-primary-dark) 100%);
  color: #fff;
  font-family: var(--nq-font);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 6px 14px -6px rgba(15, 107, 92, .6); }
  .nq-sidebar .panel-nav-branch-title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, .3);
    flex: 0 0 auto; }

/* ================================================================ */
/* Карточки и заголовки                                              */
/* ================================================================ */
.panel-card {
  background: var(--nq-surface);
  border: 1px solid var(--nq-border);
  border-radius: var(--nq-radius-lg);
  box-shadow: none;
  padding: 22px 24px;
  margin-bottom: 20px; }
  .panel-card h2 {
    font-family: var(--nq-font);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -.01em;
    color: var(--nq-text);
    margin-bottom: 18px; }
  .panel-card h3,
  .overview-block h3,
  .analytics-chart-card h3 {
    font-family: var(--nq-font);
    font-weight: 600;
    font-size: 15px;
    color: var(--nq-text); }

.lang-hint,
.panel-card .lang-hint {
  font-family: var(--nq-font);
  font-size: 12px;
  color: var(--nq-faint);
  line-height: 1.5; }

.panel-empty {
  font-family: var(--nq-font);
  color: var(--nq-faint); }

/* ---------------- KPI (StatCard) ---------------- */
.kpi-row { gap: 16px; }
.kpi-card {
  position: relative;
  flex-direction: column-reverse;
  /* Label on top, value pinned to the bottom: values of a row stay on one line even when a label wraps. */
  justify-content: space-between;
  gap: 8px;
  background: var(--nq-surface,#fff);
  border: 1px solid var(--nq-border);
  border-radius: var(--nq-radius-lg);
  padding: 18px 20px;
  transition: box-shadow .2s, transform .2s; }
  .kpi-card:hover { box-shadow: var(--nq-shadow-md); }
  .kpi-card .kpi-label {
    font-family: var(--nq-font);
    font-weight: 500;
    font-size: 11.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--nq-muted);
    padding-right: 48px; }
  .kpi-card .kpi-value {
    font-family: var(--nq-font-display);
    font-weight: 700;
    font-size: 26px;
    line-height: 1.05;
    letter-spacing: -.01em;
    color: var(--nq-text,#111827);
    animation: nqCountUp .4s ease both; }
@keyframes nqCountUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); } }

/* Иконки-плитки на KPI обзора сети */
#overviewKpis .kpi-card::before,
#overviewKpis .kpi-card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 12px; }
#overviewKpis .kpi-card::after {
  top: 27px;
  right: 27px;
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: var(--nq-ico) center / contain no-repeat;
  mask: var(--nq-ico) center / contain no-repeat; }
#overviewKpis .kpi-card:nth-child(1) { color: #0f6b5c; --nq-ico: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='13' rx='2'/%3E%3Ccircle cx='12' cy='12.5' r='2.5'/%3E%3Cpath d='M6 12.5h.01M18 12.5h.01'/%3E%3C/svg%3E"); }
#overviewKpis .kpi-card:nth-child(1)::before { background: #cdeae7; }
#overviewKpis .kpi-card:nth-child(2) { color: #2563eb; --nq-ico: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2'/%3E%3Crect x='9' y='3' width='6' height='4' rx='1'/%3E%3Cpath d='M9 12h6M9 16h4'/%3E%3C/svg%3E"); }
#overviewKpis .kpi-card:nth-child(2)::before { background: #dbeafe; }
#overviewKpis .kpi-card:nth-child(3) { color: #d97706; --nq-ico: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); }
#overviewKpis .kpi-card:nth-child(3)::before { background: #fef3c7; }
#overviewKpis .kpi-card:nth-child(4) { color: #059669; --nq-ico: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 8-8'/%3E%3Cpath d='M15 7h6v6'/%3E%3C/svg%3E"); }
#overviewKpis .kpi-card:nth-child(4)::before { background: #d1fae5; }
#overviewKpis .kpi-card:nth-child(5) { color: #7c3aed; --nq-ico: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
#overviewKpis .kpi-card:nth-child(5)::before { background: #ede9fe; }
#overviewKpis .kpi-card .kpi-value { color: var(--nq-text,#111827); }

/* Переключатель периода — сегменты */
.period-toggle {
  border: none;
  background: var(--nq-subtle,#f3f4f6);
  border-radius: 9px;
  padding: 3px;
  gap: 2px; }
  .period-btn {
    font-family: var(--nq-font);
    font-weight: 500;
    font-size: 12.5px;
    color: var(--nq-muted);
    padding: 5px 12px;
    border-radius: 7px; }
    .period-btn:hover { color: var(--nq-text); }
    .period-btn.active {
      background: var(--nq-surface,#fff);
      color: var(--nq-text);
      font-weight: 600;
      box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* ================================================================ */
/* Таблицы (data-table)                                              */
/* ================================================================ */
table.overview-table,
.guests-table,
.guest-history-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%; }
table.overview-table th,
.guests-table th,
.guest-history-table th {
  font-family: var(--nq-font);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--nq-muted);
  background: var(--nq-bg,#f9fafb);
  border-bottom: 1px solid var(--nq-border);
  padding: 10px 14px;
  white-space: nowrap; }
  table.overview-table th:first-child,
  .guests-table th:first-child { border-top-left-radius: 8px; }
  table.overview-table th:last-child,
  .guests-table th:last-child { border-top-right-radius: 8px; }
table.overview-table td,
.guests-table td,
.guest-history-table td {
  font-family: var(--nq-font);
  font-size: 13.5px;
  color: var(--nq-text-2);
  border-bottom: 1px solid var(--nq-border-soft);
  padding: 12px 14px; }
table.overview-table tbody tr:hover td,
.guests-table tbody tr:hover td { background: var(--nq-bg,#f9fafb); }
table.overview-table td:first-child { font-weight: 500; color: var(--nq-text); }

/* Топ позиций */
.overview-top-items li,
.overview-top-items .overview-top-item {
  border-radius: 10px; }
.overview-top-items .item-qty {
  font-family: var(--nq-font);
  font-weight: 700;
  font-size: 11px;
  color: var(--nq-primary-dark);
  background: var(--nq-primary-50);
  padding: 2px 9px;
  border-radius: 999px; }

/* ================================================================ */
/* Формы и кнопки                                                    */
/* ================================================================ */
.nq-shell .form-control,
.nq-shell .form-select,
.panel-card .form-control,
.panel-card select.form-control {
  font-family: var(--nq-font);
  font-size: 13.5px;
  color: var(--nq-text);
  border: 1px solid var(--nq-border);
  border-radius: 8px;
  background-color: var(--nq-surface,#fff);
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s; }
  .nq-shell .form-control:focus,
  .nq-shell .form-select:focus,
  .panel-card .form-control:focus {
    border-color: var(--nq-primary);
    box-shadow: 0 0 0 3px rgba(20, 128, 110, .12); }
.nq-shell .form-control-sm { border-radius: 7px; font-size: 13px; }
.nq-shell label,
.panel-card label,
.panel-card p.form-label-sm {
  font-family: var(--nq-font);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--nq-text-2,#374151); }

.panel-card button[type="submit"],
.nq-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--nq-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-family: var(--nq-font);
  font-weight: 500;
  font-size: 13.5px;
  box-shadow: 0 1px 2px rgba(15, 107, 92, .25);
  transition: background .15s, box-shadow .15s; }
  .panel-card button[type="submit"]:hover,
  .nq-btn-primary:hover {
    background: var(--nq-primary-dark);
    opacity: 1; }
  .panel-card button[type="submit"]:disabled {
    background: #a8dcd9;
    box-shadow: none; }

/* Чекбоксы/радио */
.form-check .form-check-input:checked,
.form-check-input:checked {
  background-color: var(--nq-primary);
  border-color: var(--nq-primary); }
.form-check-input:focus {
  border-color: var(--nq-primary-light);
  box-shadow: 0 0 0 3px rgba(20, 128, 110, .15); }

/* ================================================================ */
/* Бейджи / статусы                                                  */
/* ================================================================ */
.status-pill {
  font-family: var(--nq-font);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .02em;
  padding: 3px 10px; }
  .status-pill.ok { color: #15803d; background: #dcfce7; }
  .status-pill.ok::before { background: #22c55e; }
  .status-pill.warn { color: #a16207; background: #fef9c3; }
  .status-pill.warn::before { background: #eab308; }
  .status-pill.danger { color: #dc2626; background: #fee2e2; }
  .status-pill.danger::before { background: #ef4444; }
  .status-pill.muted { color: var(--nq-text-2,#374151); background: var(--nq-subtle,#f3f4f6); }
  .status-pill.accent { color: #c2410c; background: #ffedd5; }
  .status-pill.accent::before { background: #f97316; }

.subdomain-badge-live { color: #15803d; background: #dcfce7; }

/* Тосты */
.toast {
  font-family: var(--nq-font);
  border-radius: 10px;
  border: 1px solid var(--nq-border);
  border-left: 3px solid var(--nq-faint,#9ca3af);
  box-shadow: var(--nq-shadow-lg); }
  .toast.success { border-left-color: var(--nq-success); }
  .toast.error { border-left-color: var(--nq-danger); }

/* Табы внутри карточек */
.branch-tabs .branch-tab {
  font-family: var(--nq-font);
  font-weight: 500; }
.branch-tabs { border-bottom-color: var(--nq-border); gap: 4px; }
.branch-tabs .branch-tab { font-size: 13.5px; color: var(--nq-muted); padding: 10px 14px; }
.branch-tabs .branch-tab:hover { color: var(--nq-text); }
.branch-tabs .branch-tab.active {
  font-family: var(--nq-font);
  font-weight: 600;
  color: var(--nq-primary-dark);
  border-bottom-color: var(--nq-primary); }

/* Элементы списков */
.branch-item,
.order-items .order-item,
.po-items .po-item,
.category-list .category-item,
.review-list .review-item,
.staff-item,
.shift-item,
.res-card {
  border-color: var(--nq-border);
  border-radius: 12px; }

.menu-price,
.shift-time {
  font-family: var(--nq-font);
  font-weight: 600;
  color: var(--nq-primary-dark); }

/* ================================================================ */
/* Страница «Гости» — внутри каркаса                                 */
/* ================================================================ */
.nq-shell .guests-back-link { display: none; }
.guests-segment-filter-btn {
  font-family: var(--nq-font);
  border-radius: 999px; }
.guests-segment-filter-btn.active {
  background: var(--nq-primary);
  border-color: var(--nq-primary);
  color: #fff; }

/* ================================================================ */
/* Адаптив                                                            */
/* ================================================================ */
@media (max-width: 1100px) {
  .nq-user-toggle-phone { display: none; }
}

@media (max-width: 991.98px) {
  .nq-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
    box-shadow: none;
    z-index: 60; }
  .nq-shell.nav-open .nq-sidebar {
    transform: translateX(0);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .18); }
  .nq-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    z-index: 55; }
  .nq-shell.nav-open .nq-backdrop {
    opacity: 1;
    pointer-events: auto; }
  .nq-burger { display: inline-flex; }

  /* Отменяем старое «горизонтальное» мобильное меню из panel.css */
  .nq-sidebar .panel-sidebar,
  .nq-sidebar .panel-nav-mode {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    padding-bottom: 0; }
  .nq-sidebar .panel-nav-mode .panel-nav-label,
  .nq-sidebar .panel-nav-mode .panel-nav-divider { display: block; }
  .nq-sidebar .panel-nav-item { flex: 0 0 auto; }
  .nq-sidebar .panel-nav-branch-title { margin: 0 2px 14px; padding: 10px 12px; }
  .nq-sidebar .panel-nav-back { padding: 7px 10px; }
}

@media (max-width: 767.98px) {
  .panel-header.nq-topbar {
    padding: 0 12px;
    gap: 8px; }
  .nq-topbar .panel-header .container,
  .panel-header.nq-topbar { flex-direction: row; }
  .nq-crumb-root,
  .nq-crumb-sep { display: none; }
  .nq-topbar .panel-user { gap: 6px; }
  .nq-topbar .header-branch-switch-toggle { max-width: 120px; padding: 0 9px; }
  .nq-topbar .header-branch-switch-toggle .nq-chevron { display: none; }
  .lang-switch a,
  .nq-topbar .panel-user .lang-switch a { padding: 5px 6px; font-size: 11px; }
  .nq-user-toggle { padding: 0 2px; }
  .nq-user-toggle .nq-chevron { display: none; }
  .nq-shell .panel-body { padding: 16px 12px 40px; }
  .panel-card { padding: 18px 16px; border-radius: 12px; }
  .kpi-card { padding: 14px 16px; }
  .kpi-card .kpi-value { font-size: 22px; }
  #overviewKpis .kpi-card::before { width: 36px; height: 36px; top: 12px; right: 12px; }
  #overviewKpis .kpi-card::after { width: 18px; height: 18px; top: 21px; right: 21px; }
}

@media (max-width: 420px) {
  .nq-topbar .header-branch-switch-toggle span { display: none; }
}

/* ---------------- Правки после первого прогона ---------------- */
/* Старое правило `.panel-header .panel-user span` красило всё серым — сбрасываем */
.nq-topbar .panel-user span {
  font-family: inherit;
  font-size: inherit;
  color: inherit; }
.nq-topbar .panel-user .nq-avatar-sm { color: #fff; }
.nq-topbar .panel-user .nq-user-toggle-phone {
  font-family: var(--nq-font);
  font-weight: 600;
  font-size: 13px;
  color: var(--nq-text); }

.overview-head { align-items: center; }
.overview-controls { flex-wrap: nowrap; }
.overview-controls select.form-control {
  width: auto;
  min-width: 160px;
  height: 34px;
  padding-top: 0;
  padding-bottom: 0; }

/* Гости — таблица слева, как data-table */
.guests-segment-filter { justify-content: flex-start; }
.guests-table th,
.guests-table td { text-align: left; }
.guests-export-btn {
  font-family: var(--nq-font);
  font-weight: 500;
  border-radius: 8px; }

@media (max-width: 767.98px) {
  .overview-controls { flex-wrap: wrap; }
}

/* Красные hover у «удалить» — белый текст */
.menu-item .branch-actions button.menu-delete:hover,
.staff-item .branch-actions button.staff-delete:hover,
.shift-item .branch-actions button.shift-delete:hover,
.category-list .category-item .branch-actions button.category-delete:hover,
.review-list .review-item .review-delete:hover,
.po-items .po-item .po-action-btn.is-danger:hover,
.guest-action-btn.guest-delete-btn:hover,
.guest-edit-form .guest-edit-cancel:hover {
  color: #fff;
  border-color: #dc2626; }

/* Филиал: без «карточки в карточке» */
.panel-section.branch-mode #branchList .branch-item {
  border: none;
  padding: 0;
  margin: 0; }
.panel-section.branch-mode .branch-header { margin-bottom: 8px; }
.branch-header .branch-info p.branch-title {
  font-family: var(--nq-font);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
  color: var(--nq-text); }
.branch-header .branch-info p.branch-meta {
  font-family: var(--nq-font);
  font-size: 13px;
  color: var(--nq-muted); }

/* Аналитика: одиночная KPI-плашка компактно */
[data-section="analytics"] .panel-card > .kpi-row.small {
  grid-template-columns: repeat(auto-fill, minmax(200px, 260px));
  margin-bottom: 24px; }
.analytics-charts { margin-top: 4px; }
.analytics-chart-card {
  border: 1px solid var(--nq-border);
  border-radius: var(--nq-radius-lg);
  padding: 16px 18px 10px; }
.overview-block .kpi-row { margin-bottom: 24px; }
.overview-block { min-width: 0; }

/* Кнопки-ссылки кухня/зал и «добавить» */
.branch-kitchen-link,
.branch-hall-link,
.new-order-add-btn,
.new-order-table-add-btn {
  font-family: var(--nq-font);
  font-weight: 500;
  border-radius: 8px; }
.menu-item .branch-actions button,
.staff-item .branch-actions button,
.shift-item .branch-actions button,
.category-list .category-item .branch-actions button,
.order-items .order-item .order-print-btn,
.order-items .order-item .order-delete,
.guest-action-btn {
  font-family: var(--nq-font);
  font-weight: 500;
  font-size: 12.5px;
  border-radius: 8px; }

/* Теги в карточках меню */
.menu-info p.menu-category-tag {
  color: var(--nq-primary-dark);
  background: var(--nq-primary-50); }
.menu-info p.menu-department-tag {
  color: #a16207;
  background: #fef9c3; }

@media (max-width: 767.98px) {
  #overviewKpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  #overviewKpis .kpi-card .kpi-label { padding-right: 40px; font-size: 10.5px; }
}

/* ================================================================ */
/* Вход / заявка — как Login.tsx шаблона                              */
/* ================================================================ */
.auth-page.nq-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  justify-content: stretch;
  min-height: 100vh;
  padding: 0;
  background: var(--nq-surface,#fff);
  font-family: var(--nq-font); }
  .auth-page.nq-auth::before,
  .auth-page.nq-auth::after { display: none; }

.nq-auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 48px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 80%, rgba(20, 128, 110, .35) 0%, rgba(20, 128, 110, 0) 45%),
    linear-gradient(160deg, #0f4f46 0%, var(--nq-text,#111827) 55%, #030712 100%); }
  .nq-auth-aside::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -180px;
    top: -200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 205, 203, .25) 0%, rgba(124, 205, 203, 0) 70%);
    pointer-events: none; }
.nq-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
  z-index: 1; }
  .nq-auth-brand .nq-brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 50%; }
  .nq-auth-brand .nq-brand-mark img { width: 21px; height: 21px; }
  .nq-auth-brand-name {
    font-family: var(--nq-font-display);
    font-weight: 700;
    font-size: 21px;
    color: #fff; }
.nq-auth-hero {
  margin-top: 64px;
  max-width: 520px;
  position: relative;
  z-index: 1; }
  .nq-auth-hero h2 {
    font-family: var(--nq-font);
    font-weight: 700;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: #fff;
    margin: 0 0 18px; }
  .nq-auth-hero p {
    font-size: 16px;
    line-height: 1.6;
    color: #9fd8d5;
    margin: 0; }
.nq-auth-features {
  list-style: none;
  margin: auto 0 0;
  padding: 40px 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1; }
  .nq-auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 14px; }
  .nq-auth-features b {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #fff; }
  .nq-auth-features small {
    display: block;
    font-size: 12.5px;
    color: #9fd8d5;
    margin-top: 2px; }
.nq-auth-ico {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a8dcd9; }
  .nq-auth-ico svg { width: 18px; height: 18px; }

.nq-auth .auth-wrap {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 400px;
  padding: 48px 24px;
  align-items: stretch; }
.nq-auth .auth-logo-link { display: none; }
.nq-auth .auth-card {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  text-align: left; }
  .nq-auth .auth-card .lang-switch {
    justify-content: flex-start;
    margin-bottom: 36px; }
  .nq-auth .auth-card h1 {
    font-family: var(--nq-font);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -.02em;
    color: var(--nq-text);
    margin-bottom: 6px; }
  .nq-auth .auth-card .auth-subtitle {
    font-family: var(--nq-font);
    font-size: 14px;
    color: var(--nq-faint);
    margin-bottom: 28px; }
  .nq-auth .auth-card label {
    font-family: var(--nq-font);
    font-weight: 500;
    font-size: 13px;
    color: var(--nq-text-2,#374151); }
  .nq-auth .auth-card .form-control {
    font-family: var(--nq-font);
    height: 42px;
    font-size: 14px;
    border: 1px solid var(--nq-border);
    border-radius: 8px; }
  .nq-auth .auth-card textarea.form-control { height: auto; }
  .nq-auth .auth-card .form-control:focus {
    border-color: var(--nq-primary);
    box-shadow: 0 0 0 3px rgba(20, 128, 110, .12); }
  .nq-auth .auth-card .form-check { justify-content: flex-start !important; }
  .nq-auth .auth-card .form-check-label { font-family: var(--nq-font); font-size: 13px; color: var(--nq-muted); }
  .nq-auth .auth-card button[type="submit"] {
    font-family: var(--nq-font);
    font-weight: 600;
    font-size: 14px;
    height: 42px;
    border-radius: 8px;
    background: var(--nq-primary);
    box-shadow: 0 1px 2px rgba(15, 107, 92, .3); }
    .nq-auth .auth-card button[type="submit"]:hover { background: var(--nq-primary-dark); opacity: 1; }
  .nq-auth .auth-card .auth-error {
    font-family: var(--nq-font);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px; }
  .nq-auth .auth-card .auth-note {
    font-family: var(--nq-font);
    font-size: 12.5px;
    color: var(--nq-muted);
    background: var(--nq-bg,#f9fafb);
    border: 1px solid var(--nq-border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 24px; }
  .nq-auth .auth-card .auth-back {
    font-family: var(--nq-font);
    font-weight: 500;
    color: var(--nq-primary-dark); }

@media (max-width: 991.98px) {
  .auth-page.nq-auth { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }
  .nq-auth .auth-wrap { max-width: none; }
  .nq-auth-aside { padding: 22px 20px; }
  .nq-auth-hero { margin-top: 18px; }
  .nq-auth-hero h2 { font-size: 22px; margin-bottom: 8px; }
  .nq-auth-hero p { font-size: 13px; }
  .nq-auth-features { display: none; }
  .nq-auth .auth-wrap { padding: 28px 20px 40px; }
  .nq-auth .auth-card .lang-switch { margin-bottom: 22px; }
}

/* Кабинет филиала/сотрудника — только верхняя панель */
.nq-shell-solo .nq-brand-inline {
  border: none;
  padding: 0;
  min-height: 0;
  margin-right: 4px; }
.nq-shell-solo .nq-crumbs { gap: 10px; }
.nq-shell-solo .panel-container { max-width: 1280px; margin: 0 auto; }
.nq-user-chip {
  display: flex;
  align-items: center;
  gap: 8px; }
.nq-topbar .panel-user a.nq-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--nq-border);
  border-radius: 8px;
  background: var(--nq-surface,#fff);
  color: var(--nq-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center; }
  .nq-topbar .panel-user a.nq-icon-btn:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
@media (max-width: 767.98px) {
  .nq-shell-solo .nq-brand-text,
  .nq-user-chip .nq-user-toggle-phone { display: none; }
  .nq-shell-solo .nq-crumbs .nq-crumb-sep { display: none; }
}

.nq-shell-solo #branchList .branch-item {
  border: none;
  padding: 0;
  margin: 0; }
.nq-shell-solo .branch-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.nq-shell-solo .branch-tabs .branch-tab { white-space: nowrap; flex: 0 0 auto; }

/* ================================================================ */
/* Фирменные цвета Noqta: бирюза — основной, оранжевый — главные кнопки */
/* ================================================================ */
:root {
  --nq-accent: #ea580c;
  --nq-accent-dark: #c2410c; }
.panel-card button[type="submit"],
.nq-btn-primary,
.nq-auth .auth-card button[type="submit"] {
  background: var(--nq-accent);
  box-shadow: 0 1px 2px rgba(234, 88, 12, .3); }
  .panel-card button[type="submit"]:hover,
  .nq-btn-primary:hover,
  .nq-auth .auth-card button[type="submit"]:hover { background: var(--nq-accent-dark); }
  .panel-card button[type="submit"]:disabled { background: #fdba8c; box-shadow: none; }
.nq-sidebar .panel-nav-soon-badge { color: #c2410c; background: #ffedd5; }
#overviewKpis .kpi-card:nth-child(4) { color: #ea580c; }
#overviewKpis .kpi-card:nth-child(4)::before { background: #ffedd5; }
/* Все кнопки действий — оранжевые (бирюза остаётся для навигации/выбора) */
.branch-edit-row .branch-save,
.branch-kitchen-link,
.branch-hall-link,
.branch-reservations-section .res-save-btn,
.loyalty-campaign-foot button,
.new-order-add-btn,
.new-order-table-add-btn,
.photo-crop-actions .photo-crop-apply,
.res-board-head .res-new-btn,
.res-new-form .res-create-btn {
  background-color: var(--nq-accent);
  color: #fff; }
.branch-edit-row .branch-save:hover,
.branch-kitchen-link:hover,
.branch-hall-link:hover,
.branch-reservations-section .res-save-btn:hover,
.loyalty-campaign-foot button:hover,
.new-order-add-btn:hover,
.new-order-table-add-btn:hover,
.photo-crop-actions .photo-crop-apply:hover,
.res-board-head .res-new-btn:hover,
.res-new-form .res-create-btn:hover {
  background-color: var(--nq-accent-dark);
  color: #fff; }

/* ================================================================ */
/* Схема зала (hallmap-panel.js)                                     */
/* ================================================================ */
.hm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 14px; }
.hm-zones, .hm-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-zone {
  font-family: var(--nq-font);
  font-weight: 500;
  font-size: 13px;
  border: 1px solid var(--nq-border);
  background: var(--nq-surface,#fff);
  color: var(--nq-text-2);
  border-radius: 999px;
  padding: 6px 14px; }
  .hm-zone.active { background: var(--nq-primary); border-color: var(--nq-primary); color: #fff; }
  .hm-zone-add { border-style: dashed; color: var(--nq-muted); }
.hm-btn {
  font-family: var(--nq-font);
  font-weight: 500;
  font-size: 13px;
  border: 1px solid var(--nq-border);
  background: var(--nq-surface,#fff);
  color: var(--nq-text-2);
  border-radius: 8px;
  padding: 7px 14px;
  transition: background .15s; }
  .hm-btn:hover { background: var(--nq-subtle,#f3f4f6); }
  .hm-btn-primary { background: var(--nq-accent, #ea580c); border-color: var(--nq-accent, #ea580c); color: #fff; }
  .hm-btn-primary:hover { background: var(--nq-accent-dark, #c2410c); }
  .hm-btn-primary.is-dirty { box-shadow: 0 0 0 3px rgba(234, 88, 12, .25); }
  .hm-btn-danger:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.hm-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: start; }
.hm-stage {
  border: 1px solid var(--nq-border);
  border-radius: 14px;
  background: var(--nq-surface,#fff);
  padding: 10px; }
.hm-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 625;
  border-radius: 10px;
  background-color: var(--nq-bg,#f9fafb);
  background-image:
    linear-gradient(#eef0f3 1px, transparent 1px),
    linear-gradient(90deg, #eef0f3 1px, transparent 1px);
  background-size: 4% 6.4%;
  touch-action: none;
  overflow: hidden; }
.hm-table {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--nq-surface,#fff);
  border: 2px solid var(--nq-primary-light);
  border-radius: 12px;
  cursor: grab;
  user-select: none;
  box-shadow: 0 2px 6px rgba(17, 24, 39, .06);
  transition: box-shadow .15s, border-color .15s; }
  .hm-table.is-round { border-radius: 50%; }
  .hm-table:hover { box-shadow: 0 6px 14px rgba(17, 24, 39, .1); }
  .hm-table.is-selected { border-color: var(--nq-primary); box-shadow: 0 0 0 4px rgba(20, 128, 110, .18); z-index: 2; }
  .hm-table:active { cursor: grabbing; }
.hm-table-name {
  font-family: var(--nq-font);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--nq-text);
  text-align: center;
  line-height: 1.2;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%; }
.hm-table-seats { font-family: var(--nq-font); font-size: 11px; color: var(--nq-muted); }
.hm-handle {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--nq-primary);
  border: 2px solid #fff;
  cursor: nwse-resize;
  opacity: 0;
  transition: opacity .15s; }
  .hm-table:hover .hm-handle, .hm-table.is-selected .hm-handle { opacity: 1; }
.hm-side {
  border: 1px solid var(--nq-border);
  border-radius: 14px;
  background: var(--nq-surface,#fff);
  padding: 16px; }
  .hm-side h3 { font-size: 15px; margin: 0 0 12px; }
.hm-side-empty { font-family: var(--nq-font); font-size: 13px; color: var(--nq-muted); margin: 0; }
.hm-field { display: block; margin-bottom: 10px; }
  .hm-field > span { display: block; font-family: var(--nq-font); font-weight: 500; font-size: 12px; color: var(--nq-text-2); margin-bottom: 4px; }
.hm-shape { display: flex; }
.hm-side-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.hm-unplaced { margin-top: 14px; }
.hm-unplaced-title { font-family: var(--nq-font); font-size: 12.5px; color: var(--nq-muted); margin-bottom: 6px; }
.hm-unplaced-list { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-chip {
  font-family: var(--nq-font);
  font-size: 12.5px;
  border: 1px dashed var(--nq-primary-light);
  background: var(--nq-primary-50);
  color: var(--nq-primary-dark);
  border-radius: 999px;
  padding: 5px 12px; }
.hm-pin {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--nq-border-soft); }
  .hm-pin h3 { font-size: 15px; margin-bottom: 4px; }
.hm-pin-status { font-family: var(--nq-font); font-size: 13px; color: #b45309; margin: 8px 0; }
  .hm-pin-status.is-set { color: #15803d; }
.hm-pin-row { display: flex; gap: 8px; max-width: 460px; }
  .hm-pin-row .form-control { max-width: 160px; }
@media (max-width: 991.98px) {
  .hm-body { grid-template-columns: minmax(0, 1fr); }
}

/* ================================================================ */
/* Меню как в Poster: раскрывающиеся группы (2026-10-03)             */
/* ================================================================ */
.nq-sidebar .nav-group { margin-bottom: 2px; }
.nq-sidebar .nav-group-head {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  font-family: var(--nq-font);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--nq-text-2);
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s; }
  .nq-sidebar .nav-group-head:hover { background: var(--nq-subtle,#f3f4f6); color: var(--nq-text); }
  .nq-sidebar .nav-group-head .panel-nav-icon { width: 18px; height: 18px; color: var(--nq-faint); opacity: 1; flex: 0 0 auto; }
  .nq-sidebar .nav-group-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nq-sidebar .nav-group-chevron { width: 14px; height: 14px; color: var(--nq-faint); transition: transform .2s; flex: 0 0 auto; }
.nq-sidebar .nav-group.open > .nav-group-head .nav-group-chevron { transform: rotate(90deg); }
.nq-sidebar .nav-group.has-active > .nav-group-head { color: var(--nq-primary-dark); }
  .nq-sidebar .nav-group.has-active > .nav-group-head .panel-nav-icon { color: var(--nq-primary); }
.nq-sidebar .nav-group-items {
  display: none;
  flex-direction: column;
  gap: 1px;
  margin: 2px 0 8px 20px;
  padding-left: 12px;
  border-left: 1px solid var(--nq-border); }
.nq-sidebar .nav-group.open > .nav-group-items { display: flex; }
.nq-sidebar .nav-group-items .panel-nav-item {
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--nq-muted); }
  .nq-sidebar .nav-group-items .panel-nav-item:hover { color: var(--nq-text); }
  .nq-sidebar .nav-group-items .panel-nav-item.active {
    background: var(--nq-primary-50);
    color: var(--nq-primary-dark);
    font-weight: 600; }
.nq-sidebar .nav-group-items .panel-nav-sublist { margin: 0 0 4px 10px; }
.nq-sidebar .nav-group-items .panel-nav-item.soon { color: #c0c4cc; }
/* A top-level item without a group (Поддержка): looks like a group head. */
.nq-sidebar .panel-nav-item.nav-single { padding: 9px 12px; font-weight: 600; color: var(--nq-text-2); }
  .nq-sidebar .panel-nav-item.nav-single .panel-nav-icon { flex: 0 0 auto; }
  .nq-sidebar .panel-nav-item.nav-single.active { color: var(--nq-primary-dark); }

/* ================================================================ */
/* Бизнес-ланч (bizlunch-panel.js) + КБЖУ                           */
/* ================================================================ */
.bl-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.bl-card { border: 1px solid var(--nq-border); border-radius: 14px; padding: 16px 18px; background: var(--nq-surface,#fff); }
  .bl-card.is-off { opacity: .65; }
.bl-card-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bl-card-title { font-family: var(--nq-font); font-weight: 700; font-size: 16px; color: var(--nq-text); }
.bl-card-meta { font-family: var(--nq-font); font-size: 12.5px; color: var(--nq-muted); margin-top: 2px; }
.bl-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bl-card-price { font-family: var(--nq-font-display); font-weight: 700; font-size: 20px; color: var(--nq-primary-dark); }
.bl-courses { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.bl-course-row { font-family: var(--nq-font); font-size: 13px; display: flex; gap: 10px; }
.bl-course-name { font-weight: 600; color: var(--nq-text-2); min-width: 110px; }
.bl-course-items { color: var(--nq-muted); }
.bl-actions { margin-top: 10px; display: flex; gap: 6px; }
.bl-editor { margin-top: 16px; border-color: var(--nq-primary-light); }
  .bl-editor h3 { font-size: 16px; margin-bottom: 12px; }
.bl-label { font-family: var(--nq-font); font-weight: 600; font-size: 12.5px; color: var(--nq-text-2); margin: 14px 0 6px; }
.bl-days, .bl-daytabs, .bl-items { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-daytabs { margin: 14px 0 8px; }
.bl-day, .bl-daytab, .bl-item {
  font-family: var(--nq-font); font-size: 13px; font-weight: 500;
  border: 1px solid var(--nq-border); background: var(--nq-surface,#fff); color: var(--nq-text-2);
  border-radius: 999px; padding: 6px 13px; }
  .bl-day.on, .bl-daytab.active, .bl-item.on { background: var(--nq-primary); border-color: var(--nq-primary); color: #fff; }
.bl-course { border: 1px dashed var(--nq-border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fcfcfd; }
.bl-course-hint { font-family: var(--nq-font); font-size: 12px; color: var(--nq-muted); margin: 10px 0 6px; }
.bl-courses-edit > .hm-btn { margin-right: 6px; }
.bl-footer { display: flex; gap: 8px; margin-top: 16px; }
/* Lunch constructor (2026-10-22): schedule, slots with dishes, types with price. */
.bl-section-title { font-family: var(--nq-font); font-weight: 700; font-size: 14px; color: var(--nq-text); margin: 20px 0 8px; }
.bl-section-title + .lang-hint { margin-top: -4px; }
.bl-hours { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.bl-times { display: flex; align-items: center; gap: 8px; font-family: var(--nq-font); font-size: 13px; color: var(--nq-text-2); }
  .bl-times input { width: 112px; }
.bl-slots { display: flex; flex-direction: column; gap: 10px; }
.bl-slot { border: 1px dashed var(--nq-border); border-radius: 12px; padding: 12px; background: var(--nq-subtle, #f9fafb); }
.bl-slot-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 36px; gap: 6px; }
  .bl-slot-head .hm-btn { padding: 0; height: 36px; }
.bl-chosen { margin: 10px 0 8px; min-height: 30px; align-items: center; }
.bl-chip { display: inline-flex; align-items: center; gap: 6px; padding-right: 6px; }
.bl-chip-x { border: 0; background: rgba(255, 255, 255, .25); color: inherit; width: 20px; height: 20px; border-radius: 50%; line-height: 18px; padding: 0; font-size: 14px; }
.bl-empty { font-family: var(--nq-font); font-size: 12.5px; color: var(--nq-muted); }
.bl-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.bl-presets-label { font-family: var(--nq-font); font-size: 12.5px; color: var(--nq-muted); margin-right: 4px; }
.bl-picker { margin-top: 10px; border: 1px solid var(--nq-border); border-radius: 12px; padding: 10px; background: var(--nq-surface, #fff); }
.bl-picker-list { max-height: 340px; overflow-y: auto; margin: 10px 0; display: flex; flex-direction: column; gap: 12px; }
.bl-picker-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-family: var(--nq-font); font-size: 13px; color: var(--nq-text); }
.bl-cat-all { border: 1px solid var(--nq-primary); color: var(--nq-primary-dark); background: transparent; border-radius: 999px; font-size: 12px; padding: 3px 10px; }
.bl-types { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.bl-type { width: 100%; border: 1px solid var(--nq-border); border-radius: 12px; padding: 12px; background: var(--nq-surface, #fff); }
  .bl-type.is-off { opacity: .6; }
.bl-type-top { display: grid; grid-template-columns: auto minmax(0, 1fr) 120px auto 36px; gap: 8px; align-items: center; margin-bottom: 10px; }
  .bl-type-top .hm-btn { padding: 0; height: 36px; }
.bl-type-no { font-family: var(--nq-font); font-weight: 700; font-size: 13px; color: var(--nq-text); white-space: nowrap; }
.bl-types-list { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.bl-type-row { display: flex; justify-content: space-between; gap: 12px; font-family: var(--nq-font); font-size: 13px; }
  .bl-type-row.is-off { opacity: .55; text-decoration: line-through; }
.bl-type-name { color: var(--nq-text-2); }
.bl-type-price { font-weight: 700; color: var(--nq-primary-dark); white-space: nowrap; }
@media (max-width: 720px) {
  .bl-slot-head { grid-template-columns: 1fr 36px; }
    .bl-slot-head input:nth-child(2), .bl-slot-head input:nth-child(3) { grid-column: 1; }
  .bl-type-top { grid-template-columns: 1fr 100px 36px; }
    .bl-type-top .bl-type-no { grid-column: 1 / -1; }
}
.menu-info p.menu-nutrition-tag {
  display: inline-block; font-family: var(--nq-font); font-size: .72rem; font-weight: 600;
  color: #047857; background: #ecfdf5; border-radius: .35rem; padding: .15rem .5rem; margin: 0 .3rem .5rem 0; }
.bl-pick { border: 1px solid var(--nq-border); border-radius: 12px; padding: 12px; margin: 10px 0; background: var(--nq-surface,#fff); }
.bl-pick-title { font-family: var(--nq-font); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.bl-actions button {
  font-family: var(--nq-font); font-weight: 500; font-size: 12.5px;
  border: 1px solid var(--nq-border); background: var(--nq-surface,#fff); color: var(--nq-text-2);
  border-radius: 8px; padding: 6px 13px; transition: background .15s; }
  .bl-actions button:hover { background: var(--nq-subtle,#f3f4f6); }
  .bl-actions button.menu-delete:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

/* ================================================================ */
/* Отступы: кнопка никогда не прилипает к тексту над ней (2026-10-03) */
/* ================================================================ */
.nq-shell .lang-hint { margin-bottom: 14px; }
.nq-shell .lang-hint + button,
.nq-shell .lang-hint + .hm-btn,
.nq-shell .lang-hint + a,
.nq-shell p + button,
.nq-shell p + .hm-btn { margin-top: 2px; }
.nq-shell .hm-toolbar { margin-top: 0; margin-bottom: 14px; }
.nq-shell .panel-card label + button,
.nq-shell .panel-card .form-control + button { margin-top: 8px; }
@media (max-width: 767.98px) {
  .nq-shell .row > [class*="col"] > button,
  .nq-shell .row > [class*="col"] > .hm-btn { margin-top: 8px; }
}

/* ---- Modifiers (templates/js/modifiers-panel.js) ---- */
.menu-info p.menu-mods-tag {
  display: inline-block; font-family: var(--nq-font); font-size: .72rem; font-weight: 600;
  color: #9a3412; background: #fff7ed; border-radius: .35rem; padding: .15rem .5rem; margin: 0 .3rem .5rem 0; }
.dish-mods-editor { background: var(--nq-surface, #fff); border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 16px; margin: -4px 0 14px; }
.dish-mods-list { display: flex; flex-direction: column; gap: 6px; }
.dish-mods-editor .dish-mods-row { display: flex !important; margin: 0; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; cursor: pointer; }
.dish-mods-name { font-weight: 600; }
.dish-mods-meta { color: var(--nq-text-2); font-size: 12.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dish-mods-move { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: transparent; border-radius: 8px; padding: 2px 9px; }
.mod-opts-edit .mod-opt-row { margin-bottom: 8px; }
.mod-opts-edit > .hm-btn { margin-top: 4px; }
.mod-opts-view { margin: 10px 0 12px; }
#modgroupsRoot > .hm-btn-primary { margin-bottom: 16px; }
.new-order-mods { margin: 4px 0 10px; }
.new-order-mods:empty { display: none; }
.mod-choose-group .bl-label { margin-top: 8px; }
.mod-opt-head { font-family: var(--nq-font); font-size: 11.5px; font-weight: 600; color: var(--nq-text-2); margin-bottom: 4px; }
@media (max-width: 767px) {
  .mod-opt-head { display: none; }
  .mod-opts-edit .mod-opt-row { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; padding: 8px 4px; margin: 0 0 10px; }
}

/* ---- Roles and permissions (templates/js/roles-panel.js) ---- */
#rolesRoot > .hm-btn-primary { margin-bottom: 16px; }
.roles-list { display: grid; gap: 12px; }
.role-card { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 14px 16px; background: var(--nq-surface, #fff); display: grid; gap: 10px; }
.role-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.role-card-title { font-family: var(--nq-font); font-weight: 700; font-size: 15px; }
.role-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.role-app { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.role-app-biznes { background: #d7efe9; color: #0f5f52; }
.role-app-staff { background: #ffedd5; color: #9a3412; }
.role-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.role-badge { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: #f1f5f4; color: var(--nq-text-2); }
.role-badge-custom { background: #fff7ed; color: #9a3412; }
.role-badge-changed { background: #ecfdf5; color: #047857; }
.role-perms { display: flex; flex-wrap: wrap; gap: 6px; }
.role-perm { font-size: 12.5px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 999px; padding: 3px 10px; color: var(--nq-text-2); }
.role-perm-none { border-style: dashed; }
.role-editor { border-color: var(--nq-primary); }
.role-editor h3 { margin: 0; font-size: 16px; }
.role-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.role-group { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 8px; align-content: start; }
.role-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.role-group legend { font-family: var(--nq-font); font-weight: 600; font-size: 12.5px; color: var(--nq-text-2); padding: 0 4px; width: auto; float: none; margin: 0; }
.role-check { display: flex !important; align-items: flex-start; gap: 8px; font-size: 13.5px; cursor: pointer; margin: 0; }
.role-check input { margin-top: 3px; }
.role-confirm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--nq-border, var(--nq-border,#e5e7eb)); }
.staff-role-hint { margin: 0 0 6px; }

/* ---- Terminal PIN pad (views/site/pages/panel/pin.php) ---- */
.nq-pin-page { margin: 0; min-height: 100vh; background: #f4f7f6; font-family: var(--nq-font); }
.nq-pin-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.nq-pin-card { width: 100%; max-width: 460px; background: var(--nq-surface,#fff); border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 20px; padding: 24px 24px 20px; text-align: center; display: grid; gap: 10px; }
.nq-pin-card .lang-switch { justify-self: end; }
.nq-pin-venue { margin: 0; color: var(--nq-primary); font-weight: 600; font-size: 14px; }
.nq-pin-card h1 { margin: 0; font-size: 22px; font-weight: 700; }
.nq-pin-empty { margin: 0; font-size: 13px; color: #9a3412; background: #fff7ed; border-radius: 10px; padding: 8px 10px; }
.nq-pin-dots { display: flex; justify-content: center; gap: 14px; margin: 12px 0 4px; }
.nq-pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--nq-primary); }
.nq-pin-dots span.on { background: var(--nq-primary); }
.nq-pin-error { min-height: 20px; color: #b91c1c; font-size: 13.5px; }
/* ТЗ FR-9.2: «sign in / came–left» switch on the PIN pad */
.nq-pin-mode { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--nq-subtle,#f3f4f6); margin: 4px 0 6px; }
.nq-pin-mode button { border: 0; background: transparent; border-radius: 9px; padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--nq-text-2,#374151); cursor: pointer; }
.nq-pin-mode button.on { background: var(--nq-surface,#fff); color: #14806E; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.nq-pin-ok { min-height: 20px; color: #047857; font-size: 14px; font-weight: 600; }
.nq-pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.nq-pin-key { height: clamp(64px, 13vh, 96px); border-radius: 16px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: #f8faf9; font-size: 24px; font-weight: 600; color: var(--nq-text,#111827); cursor: pointer; }
.nq-pin-key { font-size: clamp(26px, 5vh, 38px) !important; }
.nq-pin-key:active { background: var(--nq-primary); color: #fff; }
.nq-pin-key:focus-visible { outline: 2px solid var(--nq-primary); outline-offset: 2px; }
.nq-pin-back { font-size: 20px; }
.nq-pin-link { font-size: 13px; color: var(--nq-text-2); margin-top: 6px; }
.nq-pin-lock-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--nq-text, var(--nq-text,#111827)); text-decoration: none; background: var(--nq-surface,#fff); white-space: nowrap; }
.nq-pin-lock-btn:hover { border-color: var(--nq-primary); color: var(--nq-primary); }
.staff-pin-clear-wrap { margin-top: 4px; }

/* ---- Discounts (templates/js/discount-ui.js) ---- */
.order-line-disc, .hall-line-disc { display: block; color: #047857; font-size: 12px; font-weight: 600; }
.order-line-disc-btn { margin-left: 8px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface,#fff); border-radius: 8px; padding: 0 8px; font-weight: 700; color: var(--nq-primary); cursor: pointer; }
.order-item-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.hall-item-disc { color: var(--nq-primary, #14806E); }
.hall-disc-btn { margin-top: 6px; }
.role-limits { margin-top: 4px; }
.order-items .order-item .order-disc-btn, .order-items .order-item .order-guest-btn {
  border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface,#fff); color: var(--nq-primary, #14806E);
  font-family: var(--nq-font); font-weight: 600; font-size: 12.5px; border-radius: 8px; padding: .45rem .9rem; cursor: pointer; }
.order-items .order-item .order-disc-btn:hover, .order-items .order-item .order-guest-btn:hover { border-color: var(--nq-primary, #14806E); }

/* ---- Hub sync journal ---- */
.sync-table td { vertical-align: top; font-size: 13px; }
.sync-table td small { color: var(--nq-text-2); }
.sync-table td.sync-lost b { text-decoration: line-through; color: var(--nq-text-2); font-weight: 500; }

/* ---- Two-factor sign-in (templates/js/twofa-panel.js) ---- */
.twofa-body { display: grid; gap: 12px; justify-items: start; }
.twofa-state { font-weight: 700; font-size: 13px; border-radius: 999px; padding: 4px 12px; }
.twofa-state.on { background: #ecfdf5; color: #047857; }
.twofa-state.off { background: var(--nq-subtle,#f3f4f6); color: var(--nq-text-2); }
.twofa-row { display: flex; gap: 8px; flex-wrap: wrap; }
.twofa-code { width: 160px !important; letter-spacing: 3px; font-size: 18px; text-align: center; }
.twofa-qr { padding: 10px; background: var(--nq-surface,#fff); border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; }
.twofa-key code { font-size: 14px; letter-spacing: 1px; }
.twofa-err { color: #b91c1c; font-size: 13px; min-height: 18px; }
.twofa-step { margin: 0; font-weight: 600; }
.twofa-rec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.twofa-rec code { font-size: 15px; letter-spacing: 1px; }
.twofa-rec-title { margin: 6px 0 0; font-size: 16px; }
.twofa-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.twofa-dialog-head h2 { margin: 0; }
.staff-2fa-reset { color: #b45309; }

/* ---- NOQTA TERMINAL: Settings → Terminals (templates/js/terminals-panel.js) ---- */
.term-block { border-top: 1px solid var(--nq-border,#e5e7eb); padding-top: 16px; margin-top: 16px; display: grid; gap: 10px; justify-items: start; }
.term-block .table-responsive { width: 100%; }
.term-h { margin: 0; font-size: 16px; font-weight: 700; }
.term-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.term-row .form-control, .term-row .form-select, .term-row .hm-btn { height: 36px; }
.term-pin { width: 140px !important; letter-spacing: 6px; font-size: 18px; text-align: center; }
.term-pin::placeholder { letter-spacing: normal; font-size: 14px; }
.term-lock-label { font-weight: 600; margin: 0; }
.term-lock-select { width: auto !important; min-width: 160px; }
.term-msg { font-size: 13px; min-height: 18px; }
.term-msg.err { color: #b91c1c; }
.term-msg.ok { color: #047857; }
.term-table td { vertical-align: middle; font-size: 14px; }
.term-table th { font-size: 12px; font-weight: 600; color: var(--nq-text-2); text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.term-table .form-control-sm, .term-table .form-select-sm { min-width: 140px; }
.term-dev small, .term-seen { color: var(--nq-text-2); font-size: 12px; }
.term-act { white-space: nowrap; }
.term-act .hm-btn + .hm-btn { margin-left: 6px; }

/* Action journal (ТЗ FR-2.5), templates/js/audit-panel.js */
.audit-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; align-items: center; }
.audit-filters select, .audit-filters input { width: auto; min-width: 150px; flex: 0 1 auto; }
.audit-filters input[type="text"], .audit-filters input:not([type]) { flex: 1 1 220px; }
.audit-table td { vertical-align: top; font-size: 13px; }
.audit-table td small { color: var(--nq-text-2); }
.audit-table td.audit-time { white-space: nowrap; color: var(--nq-text-2); }
.audit-table td.audit-details { color: var(--nq-text-2); word-break: break-word; max-width: 420px; }
.audit-table td.audit-device { white-space: nowrap; }
.audit-table .audit-id { color: var(--nq-text-2); }
.audit-more { margin-top: 10px; }
@media (max-width: 600px) {
    .audit-filters select, .audit-filters input { flex: 1 1 100%; min-width: 0; }
}
@media (max-width: 760px) {
    .audit-table thead { display: none; }
    .audit-table, .audit-table tbody, .audit-table tr, .audit-table td { display: block; width: 100%; }
    .audit-table tr { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
    .audit-table td { border: 0; padding: 3px 0; max-width: none; white-space: normal; }
    .audit-table td::before { content: attr(data-label); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--nq-text-2); }
    .audit-table td.audit-time::before { display: none; }
    .audit-table td.audit-empty { display: none; }
    .audit-table td.audit-device br { display: none; }
    .audit-table td.audit-device small::before { content: ' · '; }
}

/* Order types settings (ТЗ FR-4.1, templates/js/ordertypes-panel.js) and the type switch in New order */
.ot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 12px; }
.ot-card { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 14px; display: grid; gap: 10px; background: var(--nq-surface, #fff); }
.ot-card-title { font-size: 15px; font-weight: 700; margin: 0; }
.ot-field { display: grid; gap: 4px; font-size: 13px; }
.ot-field-label { font-weight: 600; }
.ot-sub { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--nq-muted, var(--nq-muted,#6b7280)); margin-top: 4px; }
.ot-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.ot-check input { margin-top: 3px; }
.ot-copies { max-width: 90px; }
.new-order-type-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--nq-border, var(--nq-border-strong,#d1d5db)); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.new-order-type-seg label { margin: 0; padding: 7px 14px; cursor: pointer; font-size: 13px; font-weight: 600; border-right: 1px solid var(--nq-border, var(--nq-border-strong,#d1d5db)); }
.new-order-type-seg label:last-child { border-right: 0; }
.new-order-type-seg input { position: absolute; opacity: 0; pointer-events: none; }
.new-order-type-seg label:has(input:checked) { background: #14806E; color: #fff; }
.new-order-type-seg label:focus-within { outline: 2px solid #EA580C; outline-offset: -2px; }

/* Fast order entry (ТЗ FR-4.2, templates/js/pos-input.js) */
.new-order-scan-row { margin-bottom: 10px; }
.new-order-scan-row .new-order-scan-input { max-width: 520px; font-size: 15px; padding: 9px 12px; }
.new-order-keys-hint { margin: 4px 0 0; font-size: 12px; }

/* Category tax code badge (ТЗ FR-4.8) */
.category-vat-badge { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--nq-border-soft, var(--nq-subtle,#f3f4f6)); color: var(--nq-text, var(--nq-text,#111827)); font-size: 12px; font-weight: 600; }

/* Automatic discounts (ТЗ FR-4.11, templates/js/autodisc-panel.js) */
.ad-list { display: grid; gap: 10px; margin-bottom: 12px; }
.ad-card { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 12px 14px; background: var(--nq-surface, #fff); display: grid; gap: 6px; }
.ad-card.is-off { opacity: .6; }
.ad-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ad-state { font-size: 12px; color: var(--nq-muted, var(--nq-muted,#6b7280)); }
.ad-sum { font-size: 13px; color: var(--nq-text, var(--nq-text,#111827)); }
.ad-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-form { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 14px; display: grid; gap: 10px; margin-top: 12px; background: var(--nq-surface, #fff); }
.ad-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ad-field { display: grid; gap: 4px; font-size: 13px; }
.ad-field-label { font-weight: 600; }
.ad-days, .ad-cats { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ad-day { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; margin: 0; }
.guest-group-badge { display: inline-block; margin-top: 2px; padding: 0 8px; border-radius: 999px; background: #e3f2ef; color: #0f6b5c; font-size: 11.5px; font-weight: 600; }
.ad-actions button, .ad-add { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface, #fff); color: var(--nq-text, var(--nq-text,#111827)); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ad-actions button:hover, .ad-add:hover { border-color: var(--nq-primary, #14806e); }
.ad-add, .ad-actions .ad-save { background: #ea580c; border-color: #ea580c; color: #fff; }

/* Cancellations report (ТЗ FR-4.13, templates/js/cancels-panel.js) */
.cr-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.cr-bar input { max-width: 170px; }
.cr-go { border: 0; background: #ea580c; color: #fff; border-radius: 8px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.cr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cr-tile { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 10px 14px; display: grid; background: var(--nq-surface, #fff); }
.cr-tile b { font-size: 20px; }
.cr-tile span { font-size: 12.5px; color: var(--nq-muted, var(--nq-muted,#6b7280)); }
.cr-table-wrap { overflow-x: auto; }
.cr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cr-table th, .cr-table td { padding: 7px 8px; border-bottom: 1px solid var(--nq-border-soft, var(--nq-subtle,#f3f4f6)); text-align: left; white-space: nowrap; }
.cr-table td:nth-child(3), .cr-table td:nth-child(6) { white-space: normal; }
.cr-table .cr-wo { color: #b45309; font-weight: 600; }

/* Cash shift (ТЗ FR-4.15/4.16, templates/js/cashshift-panel.js) */
.cs-card { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 14px 16px; background: var(--nq-surface, #fff); display: grid; gap: 12px; margin-bottom: 14px; }
.cs-title { font-size: 16px; font-weight: 700; margin: 0; }
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cs-tile { border: 1px solid var(--nq-border-soft, var(--nq-subtle,#f3f4f6)); border-radius: 10px; padding: 10px 12px; display: grid; }
.cs-tile b { font-size: 18px; }
.cs-tile span { font-size: 12.5px; color: var(--nq-muted, var(--nq-muted,#6b7280)); }
.cs-tile.is-main { background: #e3f2ef; border-color: #14806e; }
.cs-tile.is-main b { color: #0f6b5c; font-size: 22px; }
.cs-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cs-sub { border: 1px dashed var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.cs-sub-title { font-weight: 700; font-size: 13.5px; }
.cs-form { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-form input { flex: 1 1 120px; min-width: 0; }
.cs-btn { border: 0; background: #ea580c; color: #fff; border-radius: 8px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.cs-close { border-style: solid; border-color: #ea580c33; }
.cs-moves { display: grid; gap: 4px; font-size: 13px; }
/* Cash shift 2026-10-18: takings by method + the drawer + closing report */
.cs-pay .cs-tile { padding: 12px 14px; gap: 2px; }
.cs-pay .cs-tile b { font-size: 22px; order: 2; }
.cs-pay .cs-tile span { order: 1; text-transform: uppercase; letter-spacing: .04em; font-size: 11.5px; font-weight: 600; }
.cs-pay .cs-tile.is-cash { border-left: 4px solid #14806e; }
.cs-pay .cs-tile.is-card { border-left: 4px solid #2563eb; }
.cs-pay .cs-tile.is-online { border-left: 4px solid #7c3aed; }
.cs-pay .cs-tile.is-total { background: var(--nq-subtle, #f3f4f6); }
.cs-drawer { border: 1px solid var(--nq-border, #e5e7eb); border-radius: 12px; padding: 12px 16px; display: grid; gap: 6px; }
.cs-drawer-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.cs-drow { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.cs-drow span { color: var(--nq-text-2, #374151); }
.cs-drow.is-plus b { color: #0f6b5c; }
.cs-drow.is-minus b { color: #dc2626; }
.cs-drow.is-main { border-top: 1px solid var(--nq-border, #e5e7eb); padding-top: 8px; margin-top: 2px; align-items: center; }
.cs-drow.is-main span { font-weight: 600; color: var(--nq-text, #111827); font-size: 15px; }
.cs-drow.is-main b { color: #0f6b5c; font-size: 22px; }
.cs-btn.cs-btn-ghost { background: var(--nq-surface, #fff); color: var(--nq-text, #111827); border: 1px solid var(--nq-border-strong, #d1d5db); }
.cs-rep-back { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cs-rep { background: var(--nq-surface, #fff); color: var(--nq-text, #111827); border-radius: 16px; width: 100%; max-width: 500px; max-height: 90vh; overflow: auto; padding: 20px; display: grid; gap: 8px; }
.cs-rep h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.cs-rep-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.cs-rep-row span { color: var(--nq-text-2, #374151); }
.cs-rep-total { background: #e3f2ef; border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.cs-rep-total span { font-size: 12.5px; color: var(--nq-text-2, #374151); }
.cs-rep-total b { font-size: 18px; color: #0f6b5c; }
.cs-rep-msg { font-size: 13px; min-height: 18px; }
.cs-rep-msg.is-ok { color: #0f6b5c; } .cs-rep-msg.is-err { color: #dc2626; }
.cs-rep-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cs-rep-foot .cs-btn { height: 36px; padding: 0 16px; }
html[data-theme="dark"] .cs-rep-total { background: #15332e; }
html[data-theme="dark"] .cs-rep-total b, html[data-theme="dark"] .cs-drow.is-main b, html[data-theme="dark"] .cs-drow.is-plus b { color: #5fd3bf; }

.cs-move { display: grid; grid-template-columns: 48px 120px 100px 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--nq-border-soft, var(--nq-subtle,#f3f4f6)); }
.cs-move-reason { color: var(--nq-muted, var(--nq-muted,#6b7280)); }
@media (max-width: 560px) { .cs-move { grid-template-columns: 44px 1fr auto; } .cs-move-reason { grid-column: 1 / -1; } }

/* Subcategories under their parent (ТЗ FR-5.1) */
.category-item.is-sub { margin-left: 28px; border-left: 3px solid #e3f2ef; }
.category-item.is-sub .category-item-names::before { content: '↳ '; color: #14806e; font-weight: 700; }
.category-item[data-depth="3"] { margin-left: 56px; }
.category-item[data-depth="4"] { margin-left: 84px; }
@media (max-width: 560px) { .category-item.is-sub { margin-left: 14px; } .category-item[data-depth="3"] { margin-left: 28px; } .category-item[data-depth="4"] { margin-left: 42px; } }

/* ТЗ FR-5.2 — combo choice steps editor, combo buttons in «Новый заказ», goods tag */
.combo-slots { margin-top: 10px; }
.combo-slot { border: 1px solid var(--border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; background: var(--surface-2, var(--nq-bg,#f9fafb)); }
.combo-slot-names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.combo-opt { display: grid; grid-template-columns: minmax(0, 1fr) 110px 34px; gap: 6px; margin-bottom: 6px; }
.combo-opt-rm, .combo-slot-btn, .combo-slot-add, .new-order-combo-btn {
    border: 1px solid var(--border, var(--nq-border-strong,#d1d5db)); background: var(--nq-surface,#fff); color: inherit; border-radius: 10px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.combo-opt-rm { padding: 0; }
.combo-slot-foot { display: flex; gap: 8px; flex-wrap: wrap; }
.combo-slot-btn.is-danger { color: #b91c1c; }
.combo-slot-add { border-style: dashed; color: #14806E; }
.new-order-combos { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; align-items: center; }
.new-order-combos .form-label-sm { width: 100%; margin: 0; }
.new-order-combo-btn:hover, .combo-slot-add:hover { border-color: #14806E; }
.menu-info p.menu-goods-tag { color: #14806E; }
.menu-info p.menu-goods-tag.is-out { color: #b91c1c; }
@media (max-width: 640px) {
    .combo-slot-names { grid-template-columns: 1fr; }
    .combo-opt { grid-template-columns: minmax(0, 1fr) 90px 34px; }
}

/* ТЗ FR-5.5 — sizes editor in the dish forms */
.menu-sizes { margin: 6px 0 4px; }
.size-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 110px; gap: 6px; margin-bottom: 8px; }
.size-stock { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.size-factor-label { display: flex; align-items: center; gap: 6px; margin: 0; }
.size-factor { width: 90px; }
.size-tc { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 240px; }
.size-tc > .combo-slot-btn { align-self: flex-start; }
.size-tc .combo-slot-btn.is-on { border-color: #14806E; color: #14806E; }
.size-tc-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 34px; gap: 6px; }
.menu-info p.menu-sizes-tag { color: #4338ca; }
@media (max-width: 640px) {
    .size-top { grid-template-columns: 1fr 1fr; }
    .size-tc-row { grid-template-columns: minmax(0, 1fr) 90px 34px; }
}

/* ТЗ FR-5.6 — automatic stop-list by stock */
.autostop-card { border: 1px solid var(--border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; background: var(--surface-2, var(--nq-bg,#f9fafb)); }
.autostop-switch { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0 0 4px; cursor: pointer; }
.autostop-now { margin: 6px 0 0; font-size: 13px; color: #b91c1c; }
.menu-info p.menu-autostop-tag { color: #b91c1c; }

/* ТЗ FR-5.8 — tech card: gross / loss % / net, heat loss and yield */
.techcard-line.techcard-line-wide { display: grid; grid-template-columns: minmax(0, 1fr) 120px 90px 70px 90px 34px; gap: 6px; align-items: center; }
.techcard-line.techcard-line-wide input { width: 100%; min-width: 0; }
.techcard-head { font-size: 12px; color: var(--nq-muted,#6b7280); font-weight: 600; margin-bottom: 2px; }
.techcard-yield { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 10px 0 4px; }
.techcard-yield label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.techcard-yield input { width: 120px; }
.techcard-yield-auto { margin: 0 0 6px; }
@media (max-width: 640px) {
    .techcard-line.techcard-line-wide { grid-template-columns: minmax(0, 1fr) 64px 62px 46px 62px 28px; gap: 3px; }
}
.techcard-actions { display: flex; gap: 8px; margin-top: 10px; }
.techcard-actions .techcard-save, .techcard-actions .techcard-cancel { border-radius: 10px; padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid var(--border, var(--nq-border-strong,#d1d5db)); background: var(--nq-surface,#fff); color: inherit; font-family: inherit; }
.techcard-actions .techcard-save { background: #EA580C; border-color: #EA580C; color: #fff; }

/* ТЗ FR-5.11 — low margin */
.menu-info p.menu-lowmargin-tag { color: #b91c1c; }
.menu-item.is-low-margin { box-shadow: inset 3px 0 0 #dc2626; }
.menu-lowmargin-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 0 0 10px; cursor: pointer; }
.menu-items.only-low-margin .menu-item:not(.is-low-margin) { display: none; }
.margin-default-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 16px; }
.margin-default-form label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.margin-default-form input { width: 140px; }
.overview-lowmargin .item-qty.is-low { color: #b91c1c; }

/* ТЗ FR-5.13 — units and packs */
.techcard-unit-box select, .po-unit-box select { width: 100%; min-width: 0; }
.po-unit-box { flex: 1; min-width: 90px; }
.stock-unit-select { margin-top: 6px; }
.ing-packs { margin: 4px 0; }
.ing-pack-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 50px 34px; gap: 6px; align-items: center; margin-bottom: 6px; max-width: 520px; }
.ing-pack-unit { font-size: 13px; color: var(--nq-muted,#6b7280); }
.techcard-actions button { border-radius: 10px; padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid var(--border, var(--nq-border-strong,#d1d5db)); background: var(--nq-surface,#fff); color: inherit; font-family: inherit; }
.techcard-actions button:first-child { background: #EA580C; border-color: #EA580C; color: #fff; }

/* ТЗ FR-5.14 — supplier prices */
.price-hint { display: flex; flex-direction: column; gap: 2px; font-size: 12px; margin-top: 3px; }
.price-hint .is-up { color: #b45309; background: #fef3c7; border-radius: 6px; padding: 2px 6px; align-self: flex-start; }
.price-hint .is-cheaper { color: #14806E; }
.po-line .price-hint { flex-basis: 100%; }
.po-line { flex-wrap: wrap; }
.sp-line { color: #14806E !important; }
.sp-box { margin: -4px 0 10px; }
.sp-editor { border: 1px solid var(--border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 10px 12px; background: var(--surface-2, var(--nq-bg,#f9fafb)); display: flex; flex-direction: column; gap: 8px; }
.sp-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto auto auto; gap: 6px; align-items: center; }
.sp-row select { min-width: 0; }
.sp-meta { font-size: 12px; color: var(--nq-muted,#6b7280); }
.sp-editor > .combo-slot-btn { align-self: flex-start; }
@media (max-width: 640px) { .sp-row { grid-template-columns: minmax(0, 1fr) 90px auto auto; } .sp-meta { display: none; } }

/* ТЗ FR-4.7 — payment in parts */
.order-items .order-item .order-pay-split-btn { border: 1px solid var(--nq-border,#e5e7eb); background: var(--nq-surface,#fff); color: var(--nq-text,#111827); font-size: .8rem; border-radius: .5rem; padding: .4rem .85rem; cursor: pointer; }
.order-items .order-item .order-pay-split-btn:hover { border-color: #14806E; color: #14806E; }
.order-items .order-item .order-receipt-btn { border: 1px solid var(--nq-border,#e5e7eb); background: var(--nq-surface,#fff); color: var(--nq-text,#111827); font-family: inherit; font-size: .8rem; line-height: 1.5; border-radius: .5rem; padding: .4rem .85rem; cursor: pointer; transition: all .3s; }
.order-items .order-item .order-receipt-btn:hover { background: #0f6b5c; border-color: #0f6b5c; color: #fff; }
.order-items .order-item .order-item-payment-badge.is-partial { background: #fef3c7; color: #b45309; }

/* ТЗ FR-4.12 — promo codes */
#promoCodesBox .pc-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
#promoCodesBox .pc-card { border: 1px solid var(--border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 12px 14px; background: var(--surface-2, var(--nq-bg,#f9fafb)); margin-bottom: 14px; }
#promoCodesBox .pc-title { font-size: 15px; margin: 0 0 8px; }
#promoCodesBox .pc-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
#promoCodesBox .pc-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 120px; flex: 1 1 140px; }
#promoCodesBox .pc-kv { display: flex; gap: 6px; }
#promoCodesBox .pc-kv select { width: 70px; }
#promoCodesBox .pc-check { display: flex; align-items: center; gap: 6px; font-size: 13px; flex-basis: 100%; }
#promoCodesBox .pc-form button[type=submit] { border-radius: 10px; padding: 8px 16px; background: #EA580C; border: 1px solid #EA580C; color: #fff; font-weight: 600; cursor: pointer; }
#promoCodesBox .pc-code { font-weight: 700; letter-spacing: .04em; }
#promoCodesBox .pc-off td { opacity: .5; }
#promoCodesBox .pc-actions { display: flex; gap: 6px; justify-content: flex-end; }
#promoCodesBox .pc-batch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border, var(--nq-border,#e5e7eb)); }
#promoCodesBox .pc-out { flex-basis: 100%; min-height: 120px; font-family: ui-monospace, monospace; }

/* Menu / ingredients import-export + bulk edit (ТЗ FR-5.7), templates/js/menu-io.js */
.io-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.io-btn { display: inline-flex; align-items: center; border: 1px solid var(--nq-border-strong,#d1d5db); background: var(--nq-surface,#fff); color: var(--nq-text,#111827); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.5; cursor: pointer; margin: 0; }
.panel-card label.io-btn { display: inline-flex; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--nq-text,#111827); margin: 0; }
.io-btn:hover { border-color: var(--nq-primary, #14806E); color: var(--nq-primary, #14806E); }
.io-btn.is-primary { background: #EA580C; border-color: #EA580C; color: #fff; }
.io-btn:disabled { opacity: .5; cursor: default; }
.io-hint { flex-basis: 100%; font-size: 12px; }
.io-bulk { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(15,23,42,.18); z-index: 900; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin: 0 0 10px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; }
.io-bulk select, .io-bulk input { width: auto; min-width: 90px; max-width: 260px; }
.io-params { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.menu-item .io-pick { flex: 0 0 auto; width: 18px; height: 18px; margin: 0 4px 0 0; cursor: pointer; accent-color: var(--nq-primary, #14806E); }
.io-back { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.io-box { background: var(--nq-surface,#fff); color: var(--nq-text,#111827); border-radius: 16px; max-width: 760px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.io-box h3 { margin: 0; font-size: 17px; }
.io-counts { margin: 0; font-weight: 600; }
.io-list { overflow: auto; flex: 1 1 auto; border: 1px solid var(--nq-border,#e5e7eb); border-radius: 10px; }
.io-row { display: grid; grid-template-columns: 52px 110px minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px; padding: 6px 10px; font-size: 13px; border-bottom: 1px solid var(--nq-subtle,#f3f4f6); }
.io-row .io-line { color: var(--nq-muted,#6b7280); }
.io-row .io-status { font-weight: 700; }
.io-row.is-new .io-status { color: #15803d; }
.io-row.is-update .io-status { color: #b45309; }
.io-row.is-error { background: #fef2f2; }
.io-row.is-error .io-status { color: #b91c1c; }
.io-row .io-detail { color: var(--nq-text-2,#374151); overflow-wrap: anywhere; }
.io-foot { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 767.98px) {
    .menu-item .branch-actions { flex-wrap: wrap; flex-shrink: 1; }
}
/* Menu rows on narrower screens (tablet, 2026-10-18): the dish column keeps a readable width
   and the buttons wrap onto their own line instead of squeezing it (text used to overlap). */
.menu-item { flex-wrap: wrap; row-gap: 8px; }
.menu-item .menu-info { flex: 1 1 260px; min-width: 220px; }
.menu-item .branch-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-left: auto; flex-shrink: 1; }
.menu-item .branch-actions button { margin: 0; }
@media (max-width: 640px) {
    .io-row { grid-template-columns: 44px 1fr; }
    .io-row .io-title, .io-row .io-detail { grid-column: 1 / -1; }
}

/* Semi-finished products (ТЗ FR-5.9), templates/js/semi-ui.js */
.semi-editor { margin: 6px 0 14px; }
.semi-title { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.semi-check { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; margin: 0 0 6px; cursor: pointer; }
.panel-card label.semi-check { display: flex; font-family: inherit; }
.semi-check input { margin-top: 3px; accent-color: var(--nq-primary, #14806E); }
.semi-modes { margin: 4px 0 6px; padding-left: 4px; }
.semi-cost { font-weight: 600; margin: 8px 0 0; }
.semi-foot { display: flex; gap: 8px; margin-top: 10px; }
.semi-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: middle; }
.semi-badge.is-produce { background: #e8f5f3; color: #0B4C41; }
.semi-badge.is-expand { background: #fff7ed; color: #9a3412; }
.semi-produce { border: 1px solid var(--nq-border,#e5e7eb); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.semi-produce-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.semi-produce-row select { flex: 1 1 220px; max-width: 360px; width: auto; }
.semi-produce-row input { width: 120px; }
.semi-preview { margin: 8px 0 0; }

/* Tech card versions (ТЗ FR-5.12), templates/js/techversions-ui.js */
.tv-box { max-width: 680px; }
.tv-list { overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.tv-item { border: 1px solid var(--nq-border,#e5e7eb); border-radius: 10px; padding: 10px 12px; }
.tv-item.is-current { border-color: #a7f3d0; background: #f0fdf9; }
.tv-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 13px; }
.tv-author { color: var(--nq-text-2,#374151); }
.tv-current { background: #14806E; color: #fff; border-radius: 999px; padding: 0 8px; font-size: 11px; font-weight: 700; }
.tv-cost { margin-left: auto; color: var(--nq-text-2,#374151); }
.tv-lines { margin: 6px 0 8px; padding-left: 18px; font-size: 13px; }
.tv-lines li.is-add { color: #15803d; font-weight: 600; }
.tv-lines li.is-del { color: #b91c1c; text-decoration: line-through; }
.tv-lines li.is-change { color: #b45309; font-weight: 600; }
.techcard-editor .tv-open { margin-left: 8px; }

/* Supplier card: terms, account, price list (ТЗ FR-6.2), templates/js/supplier-account.js */
.sa-line .sa-debt { color: #b45309; font-weight: 600; }
.sa-line .sa-overdue { color: #b91c1c; font-weight: 700; }
.sa-line .sa-prepaid { color: #15803d; font-weight: 600; }
.sa-card { border: 1px solid var(--nq-border,#e5e7eb); border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; background: var(--nq-surface,#fff); }
.sa-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.sa-tab { border: 1px solid var(--nq-border-strong,#d1d5db); background: var(--nq-surface,#fff); border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sa-tab.is-on { background: #14806E; border-color: #14806E; color: #fff; }
.sa-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; align-items: end; }
.panel-card .sa-form label.sa-field, .sa-form .sa-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.sa-form .sa-wide, .sa-form .sa-days { grid-column: 1 / -1; }
.sa-days { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.panel-card label.sa-day, .sa-day { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin: 0; }
.sa-form > button { justify-self: start; }
.sa-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 6px; }
.sa-kpi { border: 1px solid var(--nq-border,#e5e7eb); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--nq-muted,#6b7280); }
.sa-kpi b { font-size: 16px; color: var(--nq-text,#111827); }
.sa-kpi.is-debt b { color: #b45309; }
.sa-kpi.is-overdue { border-color: #fecaca; background: #fef2f2; }
.sa-kpi.is-overdue b { color: #b91c1c; }
.sa-h { font-size: 14px; font-weight: 700; margin: 14px 0 8px; }
.sa-pay { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sa-pay input, .sa-pay select { width: auto; min-width: 110px; flex: 0 1 180px; }
.panel-card label.sa-drawer, .sa-drawer { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin: 0; }
.sa-ledger tr.is-pay td { color: #15803d; }
.sa-ledger .sa-amt { white-space: nowrap; font-weight: 600; }
.sa-prices .sa-price-input { width: 110px; display: inline-block; }
.sa-po-hint { font-size: 12.5px; color: var(--nq-text-2,#374151); margin: 4px 0 6px; }
.sa-po-hint.is-low { color: #b45309; font-weight: 600; }
.sa-form .sa-field.sa-days { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.sa-form .sa-days > span { flex-basis: 100%; font-size: .875rem; margin: 0; }

/* Purchase orders by minimum + sending (ТЗ FR-6.3), templates/js/purchase-auto.js */
.pa-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 0 0 12px; }
.pa-bar .lang-hint { flex-basis: 100%; margin: 0; font-size: 12px; }
.panel-card label.pa-toggle, .pa-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 0; cursor: pointer; }
.pa-box { max-width: 820px; }
.pa-body { overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.pa-group { border: 1px solid var(--nq-border,#e5e7eb); border-radius: 10px; padding: 10px 12px; }
.pa-group.is-unassigned { background: #fffbeb; border-color: #fde68a; }
.pa-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pa-total { font-weight: 700; }
.pa-warn { color: #b45309; font-size: 12.5px; font-weight: 600; margin: 0 0 6px; }
.pa-line { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1.4fr) 100px auto; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; }
.is-unassigned .pa-line { display: block; }
.pa-info { color: var(--nq-muted,#6b7280); font-size: 12px; }
.pa-unit { color: var(--nq-text-2,#374151); white-space: nowrap; }
.pa-auto { margin-left: 6px; background: #ede9fe; color: #5b21b6; border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 700; }
.pa-sent { font-size: 12px; color: #15803d; margin: 4px 0; }
.pa-send { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-right: 6px; }
@media (max-width: 640px) {
    .pa-line { grid-template-columns: 20px 1fr 90px; }
    .pa-line .pa-info, .pa-line .pa-unit { grid-column: 2 / -1; }
}

/* Supplier invoice with VAT (ТЗ FR-6.4) */
.inv-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin: 0 0 10px; }
.inv-head .form-label-sm { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.inv-head input[type=text], .inv-head input[type=date] { width: 170px; }
.panel-card label.inv-incl, .inv-incl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 0 0 6px; cursor: pointer; }
.po-receive-line .inv-vat { width: 110px; flex: 0 0 auto; }
.inv-totals { font-weight: 600; font-size: 13px; margin: 6px 0; }
.panel-card label.inv-payer, .inv-payer { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; margin: 0 0 2px; cursor: pointer; }
.inv-payer-hint { font-size: 12px; margin: 0 0 12px; }

/* Stock write-offs: reasons + report (ТЗ FR-6.7), templates/js/writeoff-ui.js */
.wo-list { display: flex; flex-direction: column; gap: 6px; }
.wo-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--nq-subtle,#f3f4f6); font-size: 14px; }
.wo-row .wo-name { flex: 1 1 auto; }
.wo-row.is-hidden .wo-name { color: var(--nq-faint,#9ca3af); text-decoration: line-through; }
.wo-own { background: #ede9fe; color: #5b21b6; border-radius: 999px; padding: 0 8px; font-size: 11px; font-weight: 700; }
.wo-add { display: flex; gap: 8px; margin-top: 8px; }
.wo-add input { max-width: 280px; }
.wo-rep { margin-top: 22px; }
.wo-rep-title { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.wo-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 10px 0; }
.wo-agg { border: 1px solid var(--nq-border,#e5e7eb); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.wo-agg-row { display: flex; justify-content: space-between; gap: 8px; }
.cr-table tr.wo-plus td { color: #15803d; }
/* Cost method (ТЗ FR-6.10) */
.cm-opts { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.panel-card label.cm-opt, .cm-opt { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; margin: 0; cursor: pointer; }
.cm-opt input { margin-top: 3px; accent-color: var(--nq-primary, #14806E); }

/* Several warehouses per branch (ТЗ FR-6.1), templates/js/warehouses-ui.js */
.wh-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.wh-chip { border: 1px solid var(--nq-border-strong,#d1d5db); background: var(--nq-surface,#fff); border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wh-chip.is-on { background: #14806E; border-color: #14806E; color: #fff; }
.wh-manage { margin-left: auto; }
.wh-split { display: block; color: #14806E; font-size: 12px; font-weight: 500; margin-top: 2px; }
.wh-box { max-width: 640px; }
.wh-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.wh-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--nq-subtle,#f3f4f6); }
.wh-row input { flex: 1 1 180px; width: auto; }
.wh-new-title { margin-top: 6px; font-size: 13px; }
.wh-transfer { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 10px 12px; margin: 4px 0 10px; border: 1px solid #a7f3d0; background: #f0fdf9; border-radius: 10px; }
.wh-transfer label { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.wh-transfer input { width: 120px; }
.wh-transfer input[maxlength] { width: 200px; }
.wh-field { display: flex; flex-direction: column; gap: 3px; }
.semi-produce-row .wh-select { width: auto; max-width: 200px; }

/* Supplier invoice import (ТЗ FR-6.5), templates/js/invoice-import.js */
.ii-bar { margin: 0 0 10px; }
.ii-box { max-width: 1100px; overflow-y: auto; }
.ii-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-bottom: 10px; }
.ii-head .form-label-sm { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.ii-head select, .ii-head input[type=text], .ii-head input[type=date] { width: 180px; }
.ii-head input.ii-disc { width: 110px; }
.ii-table { overflow: auto; max-height: 55vh; margin-top: 10px; display: flex; flex-direction: column; flex: 0 0 auto; min-height: 90px; }
.ii-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(190px, 1.3fr) 64px 84px 92px 104px 132px 98px; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--nq-subtle,#f3f4f6); font-size: 13px; }
.ii-row.ii-th { font-size: 12px; color: var(--nq-muted,#6b7280); font-weight: 600; position: sticky; top: 0; background: var(--nq-surface,#fff); z-index: 1; }
.ii-row.is-unknown { background: #fffbeb; }
.ii-name { display: flex; flex-direction: column; min-width: 0; }
.ii-name b { font-weight: 600; overflow-wrap: anywhere; }
.ii-name small { color: var(--nq-muted,#6b7280); font-size: 11px; }
.ii-row.is-unknown .ii-name small { color: #b45309; font-weight: 600; }
.ii-ingcell { display: flex; flex-direction: column; gap: 2px; }
.panel-card label.ii-remember, .ii-remember { display: inline-flex; gap: 4px; align-items: center; font-size: 11px; color: var(--nq-muted,#6b7280); margin: 0; }
.ii-sum { text-align: right; font-weight: 600; }
.ii-sumcell { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.ii-rm { border: 0; background: transparent; color: var(--nq-muted,#6b7280); font-size: 18px; line-height: 1; width: 22px; height: 22px; border-radius: 6px; cursor: pointer; padding: 0; flex-shrink: 0; }
.ii-rm:hover { background: rgba(220,38,38,.1); color: #dc2626; }
.ii-row.ii-th span:last-child { padding-right: 28px; text-align: right; }
.ii-nameinp { font-weight: 600; }
.ii-addline { align-self: flex-start; margin: 8px 0 0; border: 1px dashed #14806E; background: transparent; color: #14806E; border-radius: 8px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ii-supadd { align-self: flex-end; height: 31px; border: 1px dashed #14806E; background: transparent; color: #14806E; border-radius: 8px; padding: 0 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ii-supbar input { width: 200px; }
.ii-attached { font-size: 12.5px; font-weight: 600; color: #14806E; }
.ii-box label.io-btn.is-disabled { opacity: .55; pointer-events: none; }
.ii-pay { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 4px 0 10px; }
.ii-pay .form-label-sm { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--nq-text-2,#374151); }
.ii-pay select { width: 190px; }
.ii-pay input { width: 120px; }
.ii-pay select.is-need { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.25); }
.id-box { max-width: 760px; }
.id-box h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.id-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 10px; }
.id-bar select { width: 180px; }
.id-debt { color: #b45309; font-size: 13.5px; }
.id-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.id-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--nq-border,#e5e7eb); border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.id-row:hover { border-color: #14806E; }
.id-main { display: flex; flex-direction: column; min-width: 0; }
.id-main b { font-weight: 600; overflow-wrap: anywhere; }
.id-main small { color: var(--nq-muted,#6b7280); font-size: 12px; }
.id-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.id-st { border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; }
.id-st.st-paid { background: #d1fae5; color: #065f46; }
.id-st.st-partial { background: #fef3c7; color: #92400e; }
.id-st.st-unpaid { background: #fee2e2; color: #991b1b; }
.id-meta { color: var(--nq-muted,#6b7280); font-size: 13px; margin: 0; }
.id-files { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.id-file { display: flex; align-items: center; justify-content: center; width: 110px; height: 140px; border: 1px solid var(--nq-border,#e5e7eb); border-radius: 10px; overflow: hidden; background: var(--nq-subtle,#f3f4f6); text-decoration: none; }
.id-file img { width: 100%; height: 100%; object-fit: cover; display: block; }
.id-ext { font-weight: 700; color: #14806E; }
.id-none { color: var(--nq-muted,#6b7280); font-size: 13px; }
.id-lines { display: flex; flex-direction: column; max-height: 30vh; overflow: auto; }
.id-line { display: grid; grid-template-columns: 1fr auto 90px; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--nq-border,#e5e7eb); font-size: 13.5px; }
.id-line b { text-align: right; font-weight: 600; }
.id-pay { margin: 0 0 4px; font-size: 13px; color: var(--nq-text-2,#374151); }
.sc-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.sc-chip { border: 1px solid var(--nq-border,#e5e7eb); background: transparent; color: var(--nq-text-2,#374151); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sc-chip.is-on { background: #14806E; border-color: #14806E; color: #fff; }
.sc-chip.is-add { border-style: dashed; border-color: #14806E; color: #14806E; }
.sc-tool { border: 0; background: transparent; color: #14806E; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; }
.sc-tool.is-danger { color: #dc2626; }
.sc-h { font-size: 14px; font-weight: 700; margin: 14px 0 6px; color: var(--nq-text-2,#374151); }
.sc-sel { width: 150px !important; display: inline-block; flex-shrink: 0; }
.ii-head .form-label-sm, .ii-head .inv-incl { font-size: 12.5px; font-weight: 600; color: var(--nq-text-2,#374151); }
.ii-box label.io-btn { display: inline-flex; width: auto; align-self: flex-start; }
.ii-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.ii-src { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ii-src label.io-btn.is-disabled { opacity: .55; pointer-events: none; }
.ii-status { margin: 8px 0 0; font-size: 13px; font-weight: 600; min-height: 18px; }
.ii-status.is-busy { color: var(--nq-muted,#6b7280); }
.ii-status.is-busy::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ii-spin .8s linear infinite; }
@keyframes ii-spin { to { transform: rotate(360deg); } }
.ii-status.is-ok { color: #14806E; }
.ii-status.is-bad { color: #b45309; }
.ii-supbar:not(:empty) { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: rgba(245,158,11,.12); font-size: 13px; font-weight: 600; }
.ii-name small.ii-warn { color: #b45309; font-weight: 600; }
.ii-newbtn { align-self: flex-start; margin-top: 3px; border: 1px dashed #14806E; background: transparent; color: #14806E; border-radius: 8px; padding: 2px 8px; font-size: 11.5px; font-weight: 600; cursor: pointer; text-align: left; }
html[data-theme="dark"] .ii-row.is-unknown { background: rgba(245,158,11,.10); }

/* Transfers between branches (ТЗ FR-6.6), templates/js/transfers-ui.js */
.tr-top { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; }
.tr-h { font-size: 15px; font-weight: 700; margin: 16px 0 8px; }
.tr-card { border: 1px solid var(--nq-border,#e5e7eb); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; }
.tr-card.is-sent { border-color: #fde68a; background: #fffbeb; }
.tr-card.is-cancelled { opacity: .6; }
.tr-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tr-status { border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; background: var(--nq-subtle,#f3f4f6); color: var(--nq-text-2,#374151); }
.tr-status.st-sent { background: #fef3c7; color: #92400e; }
.tr-status.st-received { background: #dcfce7; color: #166534; }
.tr-when { margin: 4px 0; font-size: 12px; }
.tr-lines { margin: 4px 0; padding-left: 18px; font-size: 13px; }
.tr-lines li.tr-diff { color: #b45309; font-weight: 600; }
.tr-total { font-weight: 600; font-size: 13px; margin: 4px 0; }
.tr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tr-receive, .tr-form { border-top: 1px dashed var(--nq-border,#e5e7eb); margin-top: 10px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tr-form { border: 1px solid #a7f3d0; background: #f0fdf9; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.tr-fhead { display: flex; flex-wrap: wrap; gap: 10px; }
.tr-fhead .form-label-sm, .tr-receive .form-label-sm { display: flex; flex-direction: column; gap: 3px; margin: 0; max-width: 260px; }
.tr-fline, .tr-rline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-fline select { flex: 1 1 220px; max-width: 360px; width: auto; }
.tr-fline input, .tr-rline input { width: 110px; }
.tr-have { font-size: 12px; }
.tr-form .techcard-add-line { align-self: flex-start; border: 1px dashed #9fd3c7; background: var(--nq-surface,#fff); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: #14806E; cursor: pointer; }

/* Stocktaking (ТЗ FR-6.8), templates/js/stockcount-ui.js */
.sc-search { max-width: 320px; margin: 8px 0; }
.sc-table { display: flex; flex-direction: column; border: 1px solid var(--nq-border,#e5e7eb); border-radius: 10px; overflow: auto; max-height: 65vh; }
.sc-row { display: grid; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--nq-subtle,#f3f4f6); font-size: 13px; }
.sc-row.sc-th { position: sticky; top: 0; background: var(--nq-bg,#f9fafb); font-weight: 600; color: var(--nq-text-2,#374151); font-size: 12px; z-index: 1; }
.sc-row input { width: 100%; }
.sc-name { overflow-wrap: anywhere; }
.sc-diff.is-short { color: #b91c1c; font-weight: 700; }
.sc-diff.is-plus { color: #15803d; font-weight: 700; }
.sc-amt { text-align: right; }
.sc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; max-height: 240px; overflow: auto; border: 1px solid var(--nq-border,#e5e7eb); border-radius: 8px; padding: 8px; background: var(--nq-surface,#fff); }
.panel-card label.sc-pick-item, .sc-pick-item { display: flex; gap: 6px; align-items: center; font-size: 13px; margin: 0; }
.sc-scope { max-width: 260px; }

/* Production document + journal (ТЗ FR-6.9), semi-ui.js */
.semi-pr-lines { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.semi-pr-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.semi-pr-line select { flex: 1 1 220px; max-width: 360px; width: auto; }
.semi-pr-line input { width: 120px; }
.semi-produce-row .techcard-add-line { border: 1px dashed #9fd3c7; background: var(--nq-surface,#fff); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: #14806E; cursor: pointer; }
.pr-details { margin-top: 10px; }
.pr-details summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.pr-item { border-top: 1px solid var(--nq-subtle,#f3f4f6); padding: 8px 0; font-size: 13px; }
.pr-item p { margin: 2px 0; }
.pr-item.is-cancelled { opacity: .55; }
.pr-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }

/* Lots and best-before dates (ТЗ FR-6.12), templates/js/expiry-ui.js */
.exp-box { border: 1px solid var(--nq-border,#e5e7eb); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
.exp-box.has-items { border-color: #fecaca; background: #fff7f7; }
.exp-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 6px; }
.panel-card label.exp-days, .exp-days { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--nq-text-2,#374151); margin: 0; }
.exp-days input { width: 64px; }
.exp-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 190px 110px; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid var(--nq-subtle,#f3f4f6); font-size: 13px; }
.exp-row .exp-date { color: #b45309; font-weight: 600; }
.exp-row.is-expired .exp-date { color: #b91c1c; }
.exp-lots { display: block; font-size: 12px; font-weight: 500; color: var(--nq-muted,#6b7280); margin-top: 2px; }
.exp-lots .is-expired { color: #b91c1c; font-weight: 700; }
.po-receive-line .po-receive-line-exp { width: 140px; flex: 0 0 auto; }
@media (max-width: 640px) { .exp-row { grid-template-columns: 1fr 1fr; } }

/* Kitchen report (ТЗ FR-7.9, templates/js/kitchen-report.js) */
.kr-excel { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface, #fff); border-radius: 8px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.kr-excel:disabled { opacity: .5; cursor: default; }
.kr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.kr-chip { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface, #fff); border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.kr-chip.active { background: #14806E; border-color: #14806E; color: #fff; }
.kr-table .kr-num { font-variant-numeric: tabular-nums; }
.kr-table td:first-child { white-space: normal; }
.kr-table .kr-over { color: #b91c1c; font-weight: 700; }
.kr-bar-cell { width: 35%; min-width: 80px; }
.kr-bar { display: block; height: 8px; border-radius: 4px; background: #14806E; opacity: .75; }
.kr-h { font-size: 15px; font-weight: 700; margin: 18px 0 8px; }

/* Delivery zones (ТЗ FR-7.14, templates/js/ordertypes-panel.js) */
.dz-box { margin: 14px 0; }
.dz-table-wrap { overflow-x: auto; }
.dz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dz-table th { text-align: left; font-weight: 600; color: var(--nq-muted, var(--nq-muted,#6b7280)); padding: 4px 6px; white-space: nowrap; }
.dz-table td { padding: 4px 6px; vertical-align: middle; }
.dz-table td input.form-control { min-width: 90px; }
.dz-table td.dz-num input.form-control { min-width: 70px; max-width: 100px; }
.dz-table .dz-c { text-align: center; }
.dz-del { border: 0; background: transparent; color: #b91c1c; font-size: 16px; cursor: pointer; }
.dz-add { margin-top: 8px; border: 1px dashed #14806E; color: #14806E; background: transparent; border-radius: 8px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }

/* Deliveries (ТЗ FR-7.15, templates/js/delivery-panel.js) */
.dlv-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.dlv-bar select { max-width: 220px; }
.dlv-sep { color: var(--nq-muted, var(--nq-muted,#6b7280)); font-size: 13px; margin-left: 8px; }
.dlv-btn { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface, #fff); border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.dlv-btn.is-main { background: #14806E; border-color: #14806E; color: #fff; }
.dlv-btn.is-bad { color: #b91c1c; border-color: #fecaca; }
.dlv-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 10px; overflow-x: auto; align-items: start; }
.dlv-col { background: var(--nq-bg-soft, #f7faf9); border-radius: 12px; padding: 8px; min-height: 120px; }
.dlv-col-h { font-weight: 700; font-size: 13px; margin: 2px 4px 8px; color: var(--nq-muted, var(--nq-text-2,#374151)); }
.dlv-empty { color: var(--nq-muted, var(--nq-faint,#9ca3af)); font-size: 13px; margin: 8px 4px; }
.dlv-card { background: var(--nq-surface, #fff); border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; display: grid; gap: 3px; }
.dlv-card.is-failed { border-color: #fecaca; }
.dlv-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dlv-zone { background: #E8F5F3; color: #0B4C41; border-radius: 999px; padding: 0 8px; font-weight: 600; font-size: 12px; }
.dlv-wait { margin-left: auto; color: #b45309; font-size: 12px; }
.dlv-addr { font-weight: 600; }
.dlv-items { color: var(--nq-muted, var(--nq-muted,#6b7280)); }
.dlv-courier { color: #0B4C41; font-weight: 600; }
.dlv-reason { color: #b91c1c; }
.dlv-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.dlv-acts select, .dlv-acts input { max-width: 100%; }
.dlv-q { font-size: 12px; font-weight: 600; width: 100%; }
.dlv-cash { margin-top: 16px; }
.dlv-cash-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--nq-border-soft, var(--nq-subtle,#f3f4f6)); }
.dlv-cash-row input { max-width: 120px; }
.dlv-rep { margin-top: 16px; }

/* Gift cards (ТЗ FR-8.5, templates/js/giftcards-panel.js) */
.gc-form { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 12px 14px; margin: 12px 0 16px; background: var(--nq-surface, #fff); }
.gc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 10px; }
.gc-field { display: grid; gap: 4px; font-size: 13px; color: var(--nq-muted, var(--nq-text-2,#374151)); font-weight: 600; }
.gc-quick { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.gc-chip, .gc-btn { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface, #fff); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; color: inherit; display: inline-block; }
.gc-btn.is-bad { color: #b91c1c; border-color: #fecaca; }
.gc-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #E8F5F3; border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.gc-code { font-weight: 700; letter-spacing: .04em; }
.gc-acts { display: flex; gap: 6px; flex-wrap: wrap; white-space: normal !important; }
.gc-st.is-active { color: #14806E; font-weight: 600; } .gc-st.is-used, .gc-st.is-void { color: var(--nq-muted,#6b7280); } .gc-st.is-expired { color: #b45309; }

/* Promo code conditions (ТЗ FR-8.6) */
.pc-cats { display: flex; flex-wrap: wrap; gap: 4px 12px; max-height: 140px; overflow: auto; padding: 6px 8px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 8px; font-weight: 400; }
.pc-cat { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.pc-form .pc-field-wide { grid-column: 1 / -1; }
.pc-form .pc-field-wide .pc-cats { max-height: 96px; }

/* Tip pool (ТЗ FR-9.6, templates/js/tips-panel.js) */
.tp-wrap { margin-top: 18px; }
.tp-warn { color: #b45309; background: #fff7ed; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.tp-weights, .tp-days { margin: 8px 0 12px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; padding: 8px 12px; background: var(--nq-surface, #fff); }
.tp-weights summary, .tp-days summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.tp-wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 10px 0; }
.tp-w { display: grid; gap: 3px; font-size: 13px; }
.tp-pos { color: #14806E; font-weight: 700; } .tp-neg { color: #b91c1c; font-weight: 700; }
.tp-act { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.tp-act input { max-width: 90px; }
.tp-btn { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface, #fff); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tp-btn.is-main { background: #14806E; border-color: #14806E; color: #fff; }
.gl-levels { display: grid; gap: 6px; } .gl-level { display: grid; grid-template-columns: 1.4fr 1fr 0.7fr; gap: 6px; }
.rt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-top: 12px; align-items: start; }
@media (max-width: 900px) { .rt-grid { grid-template-columns: 1fr; } }
.rt-form { display: grid; gap: 14px; }
.rt-field { display: grid; gap: 6px; }
.rt-l { font-size: 13px; font-weight: 600; color: var(--nq-text-2,#374151); }
.rt-logo { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rt-logo img { height: 44px; max-width: 120px; object-fit: contain; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 8px; padding: 4px; background: var(--nq-surface,#fff); }
.rt-flags { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.rt-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.rt-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.rt-form .cr-go { justify-self: start; padding: 8px 22px; }
.rt-prev { position: sticky; top: 76px; display: grid; gap: 8px; }
.rt-paper { background: var(--nq-subtle,#f3f4f6); border-radius: 12px; padding: 16px; display: flex; justify-content: center; max-height: 75vh; overflow: auto; }
.rt-paper .rc { box-shadow: 0 4px 16px rgba(0,0,0,.10); padding: 14px 12px; }
.ac-guest { border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; background: var(--nq-surface, #fff); }
.ac-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.ac-bal { font-weight: 700; color: #14806E; } .ac-bal.is-debt { color: #b91c1c; }
.ac-lim { color: var(--nq-muted,#6b7280); font-size: 13px; }
.ac-acts { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding-top: 8px; border-top: 1px solid var(--nq-border-soft, var(--nq-subtle,#f3f4f6)); }
.ac-grp { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ac-grp-l { font-size: 12.5px; font-weight: 600; color: var(--nq-muted,#6b7280); white-space: nowrap; }
.ac-grp input, .ac-grp select { width: 140px; }
.ac-limw { margin-left: auto; } .ac-limw input { width: 90px; }
.ac-hist { margin-top: 8px; } .ac-hist summary { cursor: pointer; font-size: 13px; color: #14806E; font-weight: 600; }
.nq-bell { position: relative; }
.nq-bell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface, #fff); border-radius: 10px; color: var(--nq-text-2,#374151); cursor: pointer; overflow: visible; }
.nq-bell-btn:hover, .nq-bell.open .nq-bell-btn { background: #E8F5F3; color: #14806E; border-color: #CDEAE7; }
.nq-bell-badge { position: absolute; top: -7px; right: -7px; box-sizing: border-box; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; border: 2px solid #fff; background: #dc2626; color: #fff !important; font: 700 11px/16px Inter, Arial, sans-serif; text-align: center; letter-spacing: 0; box-shadow: 0 1px 3px rgba(0,0,0,.25); pointer-events: none; }
.nq-bell-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: min(400px, 92vw); max-height: 72vh; overflow: auto; background: var(--nq-surface,#fff); border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 23, 42, .16); z-index: 70; padding: 6px 0; }
.nq-bell.open .nq-bell-menu { display: block; }
.nq-bell-head { padding: 10px 18px 12px; font-size: 15px; font-weight: 700; color: var(--nq-text,#111827); border-bottom: 1px solid var(--nq-border-soft, var(--nq-subtle,#f3f4f6)); }
.nq-bell-empty { padding: 22px 18px; color: var(--nq-muted,#6b7280); font-size: 13.5px; text-align: center; }
.nq-bell-item { display: flex; align-items: flex-start; gap: 12px; margin: 4px 8px; padding: 10px 10px; border-radius: 10px; color: var(--nq-text,#111827) !important; text-decoration: none !important; }
.nq-bell-item:hover { background: var(--nq-subtle,#f3f4f6); }
.nq-bell-item.is-new { background: #f0fdf9; }
.nq-bell-item.is-new:hover { background: #e3f7f1; }
.nq-bell-ic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; background: var(--nq-subtle,#f3f4f6); }
.nq-bell-ic.k-stock_low { background: #fef3c7; } .nq-bell-ic.k-stock_out { background: #fee2e2; } .nq-bell-ic.k-price_up { background: #ffedd5; } .nq-bell-ic.k-digest { background: #E8F5F3; }
.nq-bell-tx { display: grid; gap: 3px; min-width: 0; font-size: 13px; line-height: 1.4; }
.nq-bell-tx b { font-size: 13.5px; font-weight: 600; color: var(--nq-text,#111827); }
.nq-bell-tx span { color: var(--nq-text-2,#374151); overflow-wrap: anywhere; }
.nq-bell-tx small { color: var(--nq-faint,#9ca3af); font-size: 11.5px; }
/* The header's old `.panel-user a` / `.panel-user span` rules (padding 0, inherited size,
   white text on hover) must not reach the bell — same selectors, higher specificity. */
.nq-topbar .panel-user .nq-bell-item, .nq-topbar .panel-user .nq-bell-item:hover { padding: 10px; border-radius: 10px; color: var(--nq-text,#111827); text-decoration: none; }
.nq-topbar .panel-user .nq-bell-item:hover { background: var(--nq-subtle,#f3f4f6); }
.nq-topbar .panel-user .nq-bell-item.is-new { background: #f0fdf9; }
.nq-topbar .panel-user .nq-bell-item.is-new:hover { background: #e3f7f1; }
.nq-topbar .panel-user .nq-bell-item:hover b { color: var(--nq-text,#111827); }
.nq-topbar .panel-user .nq-bell-tx span { color: var(--nq-text-2,#374151); font-size: 13px; }
.nq-topbar .panel-user .nq-bell-item:hover .nq-bell-tx span { color: var(--nq-text-2,#374151); }
.nq-topbar .panel-user .nq-bell-ic { font-size: 15px; color: inherit; }
.nq-topbar .panel-user .nq-bell-badge { font-size: 11px; line-height: 16px; color: #fff; }
.nq-topbar .panel-user .nq-export-btn span { color: inherit; font-size: 13.5px; }
.nq-bell-dot { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #14806E; }
.sm2-table th, .sm2-table td { text-align: right; } .sm2-table th:first-child, .sm2-table td:first-child { text-align: left; }
.sm2-table th.sm2-in { background: #ecfdf5; } .sm2-table th.sm2-out { background: #fef2f2; }
.sm2-table td.sm2-b { font-weight: 700; } .sm2-table td.sm2-t { font-weight: 600; background: var(--nq-bg,#f9fafb); }
.sm2-sub th { font-size: 11.5px; font-weight: 600; color: var(--nq-text-2,#374151); white-space: normal; min-width: 70px; }
.sm2-row { cursor: pointer; } .sm2-row:hover td { background: var(--nq-bg,#f9fafb); }
.sm2-hist > td { background: var(--nq-bg,#f9fafb); padding: 6px 10px 12px; } .sm2-htable { font-size: 12.5px; } .sm2-htable td, .sm2-htable th { text-align: left !important; }
.nq-export { position: relative; }
.nq-export-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); background: var(--nq-surface, #fff); border-radius: 10px; padding: 7px 12px; font: inherit; font-size: 13.5px; font-weight: 600; color: #14806E; cursor: pointer; }
.nq-export-btn:hover { background: #E8F5F3; }
.nq-export-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: var(--nq-surface,#fff); border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); padding: 4px; z-index: 60; min-width: 170px; }
.nq-export.open .nq-export-menu { display: block; }
.nq-export-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; color: var(--nq-text,#111827); }
.nq-export-menu button:hover { background: var(--nq-subtle,#f3f4f6); }
@media (max-width: 720px) { .nq-export-btn span { display: none; } .nq-export-btn { padding: 7px 9px; } }
@media print { .nq-export { display: none !important; } }
.fin-form, .fin-untagged { margin: 8px 0 16px; padding: 10px 12px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; background: var(--nq-surface, #fff); }
.fin-form h4, .fin-untagged h4 { margin: 0 0 8px; }
.fin-untagged { border-color: #fdba74; background: #fff7ed; }
.fin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; align-items: center; margin: 6px 0; }
.fin-urow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--nq-border-soft, var(--nq-subtle,#f3f4f6)); font-size: 13px; }
.fin-urow span { flex: 1 1 260px; } .fin-urow select { max-width: 220px; }
.fin-inl { display: flex; gap: 6px; align-items: center; font-size: 13px; } .fin-inl input { max-width: 80px; }
.fin-akind { display: block; margin: 10px 0 4px; font-size: 13px; }
.fin-alist { display: flex; flex-wrap: wrap; gap: 6px; }
.fin-achip { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 999px; padding: 3px 10px; font-size: 13px; background: var(--nq-surface,#fff); }
.fin-achip.is-off { opacity: .5; text-decoration: line-through; }
.fin-achip button { border: 0; background: none; cursor: pointer; color: var(--nq-muted,#6b7280); padding: 0 2px; }
.fin-pnl td:not(:first-child), .fin-pnl th:not(:first-child) { text-align: right; }
.fin-pnl .fin-r-sub td:first-child { padding-left: 20px; color: var(--nq-text-2,#374151); }
.fin-pnl .fin-r-sum td { font-weight: 700; background: var(--nq-bg,#f9fafb); }
.fin-pnl .fin-r-total td { font-weight: 800; font-size: 14px; background: #ecfdf5; border-top: 2px solid #14806E; }
.fin-pnl .fin-r-pct td { color: var(--nq-text-2,#374151); font-size: 12.5px; }
.fin-pnl .fin-r-head td { padding-top: 16px; font-weight: 600; color: var(--nq-muted,#6b7280); }
.fin-pnl .fin-r-ref td, .fin-pnl .fin-r-ref-n td { color: var(--nq-muted,#6b7280); }
.dr-days { display: grid; gap: 4px; margin-bottom: 12px; max-width: 640px; }
.dr-day { display: grid; grid-template-columns: 84px 1fr 90px; gap: 8px; align-items: center; font-size: 13px; }
.dr-day em { display: block; height: 10px; background: var(--nq-gray-100, var(--nq-subtle,#f3f4f6)); border-radius: 5px; overflow: hidden; }
.dr-day i { display: block; height: 100%; background: #ea580c; border-radius: 5px; }
.dr-day b { text-align: right; font-weight: 600; }
.dr-h3 { margin: 22px 0 8px; font-size: 17px; }
.ax-seg { display: inline-flex; gap: 4px; background: var(--nq-gray-100, var(--nq-subtle,#f3f4f6)); border-radius: 10px; padding: 3px; }
.ax-seg button { border: 0; background: transparent; border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--nq-text-2,#374151); }
.ax-seg button.on { background: var(--nq-surface,#fff); color: #14806E; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ax-matrix { border-collapse: separate; border-spacing: 6px; margin: 4px -6px 10px; min-width: 560px; }
.ax-matrix th { font-size: 12.5px; color: var(--nq-muted, var(--nq-muted,#6b7280)); text-align: left; font-weight: 600; padding: 0 4px; }
.ax-cell { border-radius: 10px; padding: 8px 10px; vertical-align: top; cursor: pointer; border: 2px solid transparent; width: 33%; }
.ax-cell b { display: block; font-size: 14px; } .ax-cell span { display: block; font-size: 12px; color: var(--nq-text-2,#374151); margin-top: 2px; }
.ax-cell.on { border-color: #14806E; }
.ax-AX, .ax-AY, .ax-BX { background: #dcfce7; } .ax-AZ, .ax-BY, .ax-CX { background: #fef9c3; } .ax-BZ, .ax-CY { background: #ffedd5; } .ax-CZ { background: #fee2e2; }
.ax-badge { display: inline-block; min-width: 22px; text-align: center; border-radius: 6px; font-weight: 700; font-size: 12px; padding: 1px 6px; }
.ax-g-A .ax-badge, .ax-badge.ax-g-A, .ax-badge.ax-x-X { background: #dcfce7; color: #166534; }
.ax-badge.ax-g-B, .ax-badge.ax-x-Y { background: #fef9c3; color: #854d0e; }
.ax-badge.ax-g-C, .ax-badge.ax-x-Z { background: #fee2e2; color: #991b1b; }
.cr-tile.ax-g-A { border-color: #86efac; } .cr-tile.ax-g-B { border-color: #fde047; } .cr-tile.ax-g-C { border-color: #fca5a5; }
.ax-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.ax-spark i { display: block; width: 5px; background: #14806E; border-radius: 1px; opacity: .75; }
.ax-nocost { color: #b45309; }
.sm-limit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; font-size: 14px; }
.sm-limit input { max-width: 110px; }
.sm-limit small { flex-basis: 100%; }
.sm-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; align-items: center; margin: 8px 0 16px; padding: 10px 12px; border: 1px solid var(--nq-border, var(--nq-border,#e5e7eb)); border-radius: 10px; background: var(--nq-surface, #fff); }
.sm-form h4 { grid-column: 1 / -1; margin: 0; }
.tp-day { font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--nq-border-soft, var(--nq-subtle,#f3f4f6)); }

/* ---- Guest card (FR-8.1): name opens the card; Wallet links icon-only in the list ---- */
.guests-table .guest-cell-name-main.guest-card-btn { cursor: pointer; color: var(--nq-primary, #14806E); }
.guests-table .guest-cell-name-main.guest-card-btn:hover { text-decoration: underline; }
.guests-wallet-cell .wallet-links { display: flex; gap: 6px; flex-wrap: nowrap; }
.guests-wallet-cell .wallet-btn { font-size: 0; gap: 0; padding: 7px 9px; }
.guests-wallet-cell .wallet-btn svg { width: 15px; height: 15px; margin: 0; }
.guests-table .guest-row-actions { display: grid; grid-template-columns: repeat(2, auto); gap: 4px; justify-content: start; }
.guests-table th { padding: 10px 9px; }
.guests-table td { padding: 12px 9px; }

/* ===== Dark theme (ТЗ «Удобство»): html[data-theme="dark"], switched in the top bar ===== */
:root { --nq-subtle: #f3f4f6; --nq-border-strong: #d1d5db; }
html[data-theme="dark"] {
  color-scheme: dark;
  --nq-primary-50: #15332e; --nq-primary-100: #1b443c; --nq-primary-light: #3fbfa7;
  --nq-bg: #0e1514; --nq-surface: #161f1e; --nq-subtle: #1d2827; --nq-border: #2a3735; --nq-border-soft: #202b2a; --nq-border-strong: #3a4846;
  --nq-text: #e7efed; --nq-text-2: #c8d3d1; --nq-muted: #93a4a1; --nq-faint: #6e7f7c;
  --nq-shadow-md: 0 4px 10px rgba(0, 0, 0, .45); --nq-shadow-lg: 0 10px 24px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] body, html[data-theme="dark"] .nq-shell, html[data-theme="dark"] .nq-main { background: var(--nq-bg); color: var(--nq-text); }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select, html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
html[data-theme="dark"] select, html[data-theme="dark"] textarea {
  background-color: var(--nq-surface); color: var(--nq-text); border-color: var(--nq-border); }
html[data-theme="dark"] .form-control:focus, html[data-theme="dark"] .form-select:focus { background-color: var(--nq-surface); color: var(--nq-text); }
html[data-theme="dark"] .form-control::placeholder, html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: var(--nq-faint); }
html[data-theme="dark"] input[type=date]::-webkit-calendar-picker-indicator, html[data-theme="dark"] input[type=time]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(.85); }
html[data-theme="dark"] .table, html[data-theme="dark"] table { color: var(--nq-text); --bs-table-bg: transparent; --bs-table-color: var(--nq-text); }
html[data-theme="dark"] .table > :not(caption) > * > * { background-color: transparent; color: var(--nq-text); border-color: var(--nq-border); }
html[data-theme="dark"] .modal-content, html[data-theme="dark"] .dropdown-menu, html[data-theme="dark"] .card, html[data-theme="dark"] .list-group-item {
  background-color: var(--nq-surface); color: var(--nq-text); border-color: var(--nq-border); }
html[data-theme="dark"] .btn-light, html[data-theme="dark"] .btn-outline-secondary { background: var(--nq-subtle); color: var(--nq-text); border-color: var(--nq-border); }
html[data-theme="dark"] hr { border-color: var(--nq-border); }
html[data-theme="dark"] a:not([class]) { color: #4fd1b8; }
html[data-theme="dark"] .lang-hint, html[data-theme="dark"] .text-muted { color: var(--nq-muted) !important; }
html[data-theme="dark"] img { opacity: .96; }
/* light tinted badges stay readable on dark */
html[data-theme="dark"] .status-pill, html[data-theme="dark"] .ts-badge, html[data-theme="dark"] .res-badge { filter: saturate(.9) brightness(.92); }
/* theme switch in the top bar */
.nq-topbar .panel-user .nq-theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--nq-border); background: var(--nq-surface); color: var(--nq-text-2); cursor: pointer; padding: 0; position: relative; }
.nq-topbar .panel-user .nq-theme-btn:hover { border-color: var(--nq-primary); color: var(--nq-primary); }
.nq-topbar .panel-user .nq-theme-btn svg { width: 18px; height: 18px; }
.nq-theme-menu { position: absolute; top: 42px; right: 0; background: var(--nq-surface); border: 1px solid var(--nq-border); border-radius: 12px; box-shadow: var(--nq-shadow-lg);
  padding: 6px; display: none; z-index: 60; min-width: 170px; }
.nq-theme-menu.open { display: block; }
.nq-topbar .panel-user .nq-theme-menu button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--nq-text);
  padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.nq-topbar .panel-user .nq-theme-menu button:hover, .nq-topbar .panel-user .nq-theme-menu button.on { background: var(--nq-primary-50); color: var(--nq-primary); }
html[data-theme="dark"] .panel-header.nq-topbar { background: rgba(22, 31, 30, .94); }
html[data-theme="dark"] input[type=file]::file-selector-button { background: var(--nq-subtle); color: var(--nq-text); border: 0; border-right: 1px solid var(--nq-border); }

/* ---------------------------------------------------------------------------
 * Design pass 2026-10-05: one control height for fields and the buttons next
 * to them (36 px), rows with label-wrapped fields aligned at the bottom so the
 * button lines up with the field, not with its label. Buttons with icons are
 * inline-flex (icons from templates/js/nq-icons.js).
 * ------------------------------------------------------------------------- */
:root { --nq-ctl-h: 36px; }
.nq-shell .nq-main input.form-control,
.nq-shell .nq-main select.form-control,
.nq-shell .nq-main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=image]),
.nq-shell .nq-main select:not([multiple]):not([size]) {
  height: var(--nq-ctl-h); padding-top: 0; padding-bottom: 0; box-sizing: border-box; line-height: normal;
}
.nq-shell .nq-main :is(.cr-go, .cs-btn, .dlv-btn, .pr-btn, .rp-btn, .acx-btn, .io-btn, .hm-btn, .tp-btn, .oa-btn, .mon-btn,
  .res-nav, .res-new-btn, .po-new-btn, .ad-add, .dz-add, .combo-slot-add, .branch-save, .btn, .ax-go, .gp-btn, .fin-btn,
  form button:not([class*=chip]):not([class*=remove]):not([class*=close]):not(.nq-theme-btn)) {
  min-height: var(--nq-ctl-h); padding-top: 0; padding-bottom: 0; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.1; vertical-align: bottom;
}
/* A field with its label above it and a button in the same row: line up the bottoms. */
.nq-shell .nq-main :is(div, form, p):has(> label :is(input, select)):has(> :is(button, .btn)),
.nq-shell .nq-main :is(div, form, p):has(> label :is(input, select)):has(> div > :is(button, .btn):only-child),
.nq-shell .nq-main .row:has(> [class*=col] label :is(input, select)):has(> [class*=col] > :is(button, .btn)) { align-items: flex-end; }
/* Icons inside buttons (nq-icons.js and hand-written ones). */
.nq-ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nq-has-ic { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.nq-has-ic.nq-ic-only { gap: 0; }
/* In a row with fields, buttons and labels carry no stray vertical margins (they pushed buttons 4–8 px down). */
.nq-shell .nq-main :is(div, form, p, span, label):has(> :is(input, select, label, .form-control)) > :is(button, .btn, a.btn),
.nq-shell .nq-main :is(div, form, p):has(> label :is(input, select)) > label { margin-top: 0; margin-bottom: 0; }
.nq-shell .nq-main .row:has(> [class*=col] label :is(input, select)) > [class*=col] > :is(button, .btn) { margin-top: 0; margin-bottom: 0; }
.nq-shell .branch-edit-row .branch-save { height: var(--nq-ctl-h); min-height: var(--nq-ctl-h); }
/* Buttons that sit in a Bootstrap form row next to fields (e.g. «Данные заведения»: Сохранить / Отмена). */
.nq-shell .nq-main .row:has(> [class*=col] :is(input.form-control, select.form-control)) > [class*=col] > :is(button, .btn),
.nq-shell .nq-main .row:has(> [class*=col] :is(input.form-control, select.form-control)) > [class*=col] > .d-flex > :is(button, .btn),
.nq-shell .branch-edit-row :is(.branch-save, .branch-cancel) {
  height: var(--nq-ctl-h); min-height: var(--nq-ctl-h); padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0;
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; line-height: 1; }
/* Summary tiles: the value always first, so values of a row share one line whatever the markup order. */
.cr-tile { align-content: start; }
.cr-tile > b { order: -1; }
.branch-edit-row .branch-cancel { font-family: inherit; font-weight: 600; }
/* Segmented toggles (period, units, cash/bank): the track is one control high, labels never wrap. */
.nq-shell .nq-main :is(.period-toggle, .ax-seg) { height: var(--nq-ctl-h); box-sizing: border-box; display: inline-flex; align-items: stretch; flex-wrap: nowrap; }
.nq-shell .nq-main :is(.period-toggle, .ax-seg) > button { white-space: nowrap; min-height: 0; height: auto; margin: 0; display: inline-flex; align-items: center; }
/* Row action groups (menu, ingredients, stock, staff, shifts, categories): even spacing, one line, same height. */
.nq-shell .nq-main .branch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nq-shell .nq-main .branch-actions > :is(button, .btn, a) { margin: 0; height: 34px; min-height: 34px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; line-height: 1; }
/* Buttons with and without an icon must share the baseline-free alignment. */
.nq-shell .nq-main :is(button, .btn) { vertical-align: middle; }
.nq-topbar .nq-bell-btn { width: 36px; height: 36px; }
.nq-shell .nq-main :is(.branch-kitchen-link, .branch-hall-link, .kr-excel) { height: var(--nq-ctl-h); min-height: var(--nq-ctl-h); padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; vertical-align: middle; line-height: 1; }
/* New order: «Сохранить без кухни» is secondary to «Создать заказ» (outlined, same height). */
.panel-card button[type="submit"].new-order-nokitchen { background: transparent; color: var(--nq-accent, #ea580c); box-shadow: none; border: 1px solid var(--nq-accent, #ea580c); margin-left: 8px; }
.panel-card button[type="submit"].new-order-nokitchen:hover { background: var(--nq-accent, #ea580c); color: #fff; }
.panel-card button[type="submit"].new-order-nokitchen:disabled { background: transparent; color: #f9c9a8; border-color: #f9c9a8; }
/* 2026-10-18 owner: orange buttons must never stick to what is under them (gapaudit.js). */
.nq-shell .nq-main :is(.branch-kitchen-link, .branch-hall-link) { margin-bottom: 16px; }
.nq-shell .nq-main :is(.cr-bar, .pr-bar) { row-gap: 14px; }
.nq-shell .nq-main .combo-add-form .col-md-2 { margin-bottom: 14px; }
.nq-shell .nq-main :is(button, a) + .lang-hint { margin-top: 12px; }
.nq-shell .nq-main .combo-add-form .row { row-gap: 14px; }

/* ---- Тариф (components/Plans.php, templates/js/plan-panel.js) ---- */
.nq-sidebar .panel-nav-item.nq-plan-locked { color: var(--nq-faint); }
.nq-sidebar .nq-plan-badge { margin-left: auto; flex-shrink: 0; display: inline-flex; color: var(--nq-faint); }
.nq-sidebar .nq-plan-badge svg { width: 14px; height: 14px; }
.nq-sidebar .panel-nav-item.nq-plan-locked:hover .nq-plan-badge { color: var(--nq-primary); }
.branch-tab.nq-plan-locked { opacity: .55; }

.nq-plan-dlg { position: fixed; inset: 0; z-index: 3000; background: rgba(17, 24, 39, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.nq-plan-dlg-box { background: var(--nq-surface); color: var(--nq-text); border-radius: var(--nq-radius-lg); box-shadow: var(--nq-shadow-lg); width: 100%; max-width: 400px; padding: 24px; text-align: center; }
.nq-plan-dlg-box h3 { font-size: 17px; font-weight: 600; margin: 12px 0 6px; }
.nq-plan-dlg-box p { color: var(--nq-muted); font-size: 14px; margin: 0 0 20px; }
.nq-plan-dlg-icon { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; background: var(--nq-primary-50); color: var(--nq-primary); display: flex; align-items: center; justify-content: center; }
.nq-plan-dlg-icon svg { width: 22px; height: 22px; }
.nq-plan-dlg-actions { display: flex; gap: 8px; justify-content: center; }
.nq-plan-dlg-actions .hm-btn { min-width: 120px; }

.nq-plan-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 20px; margin: 16px 0 20px; border-radius: var(--nq-radius-md); background: var(--nq-primary-50); border: 1px solid var(--nq-primary-100); }
.nq-plan-kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--nq-primary); }
.nq-plan-name { font-family: var(--nq-font-display); font-size: 30px; font-weight: 700; line-height: 1.1; margin: 4px 0; color: var(--nq-text); }
.nq-plan-tagline { color: var(--nq-muted); font-size: 14px; }
.nq-plan-price { color: var(--nq-muted); font-size: 14px; white-space: nowrap; }
.nq-plan-price b { font-family: var(--nq-font-display); font-size: 28px; color: var(--nq-text); }
.nq-plan-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.nq-plan-cols h4, .nq-plan-card h4 { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.nq-plan-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.nq-plan-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--nq-text-2); }
.nq-plan-list li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--nq-primary); }
.nq-plan-list.is-off li { color: var(--nq-muted); }
.nq-plan-list.is-off li svg { color: var(--nq-faint); }
.nq-plan-list li.is-plus { font-weight: 600; color: var(--nq-text); }
.nq-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.nq-plan-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--nq-border); border-radius: var(--nq-radius-md); background: var(--nq-surface); }
.nq-plan-card.is-next { border-color: var(--nq-primary); box-shadow: 0 0 0 1px var(--nq-primary) inset; }
.nq-plan-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.nq-plan-card-name { font-family: var(--nq-font-display); font-size: 20px; font-weight: 700; }
.nq-plan-card-price { color: var(--nq-muted); font-size: 13px; white-space: nowrap; }
.nq-plan-card-price b { font-size: 18px; color: var(--nq-text); }
.nq-plan-card .nq-plan-list { flex: 1; }
.nq-plan-compare { margin: 16px 0 0; font-size: 14px; }
.nq-sidebar .panel-nav-item .nq-plan-label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nq-plan-dlg-box .hm-btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(234, 88, 12, .25); }
:is(.nq-plan-card, .nq-plan-dlg-actions) .hm-btn { height: 36px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.nq-plan-card .hm-btn:not(.hm-btn-primary):hover { color: var(--nq-text); }
.nq-plan-card .hm-btn-primary:hover { color: #fff; }
.nq-plan-compare a { color: var(--nq-primary); font-weight: 500; text-decoration: none; }
.nq-plan-compare a:hover { color: var(--nq-primary-dark); text-decoration: underline; }
.nq-plan-inline-lock { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; padding: 10px 12px; border-radius: var(--nq-radius-sm); background: var(--nq-border-soft); color: var(--nq-muted); font-size: 13px; }
.nq-plan-inline-lock svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.nq-tqr { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--nq-border-soft); }
.nq-tqr-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.nq-tqr-add .form-control { height: 36px; width: auto; flex: 1 1 200px; max-width: 320px; }
.nq-tqr-add .hm-btn { height: 36px; }
.nq-tqr-list { display: grid; gap: 8px; }
.nq-tqr-row { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border: 1px solid var(--nq-border); border-radius: var(--nq-radius-md); background: var(--nq-surface); }
.nq-tqr-prev { width: 52px; flex-shrink: 0; line-height: 0; }
.nq-tqr-prev svg { width: 100%; height: auto; }
.nq-tqr-name { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nq-tqr-acts { display: flex; gap: 6px; flex-shrink: 0; }
.nq-tqr-acts .hm-btn { height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.nq-tqr-acts .hm-btn svg { width: 16px; height: 16px; }
/* «Только блюда с низкой маржой» — отступ до кнопок экспорта/импорта под ним */
.nq-shell .nq-main .menu-lowmargin-filter { display: flex; width: fit-content; margin: 8px 0 16px; }
.nq-shell .nq-main .menu-lowmargin-filter input { margin: 0; accent-color: var(--nq-primary); width: 16px; height: 16px; }
/* Лимит устройств тарифа (views/site/pages/panel/plan-limit.php) */
.nq-plan-limit-page { background: var(--nq-bg); min-height: 100vh; margin: 0; }
.nq-plan-limit { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.nq-plan-limit .nq-plan-dlg-box { max-width: 460px; }
.nq-plan-limit-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; text-align: left; }
.nq-plan-limit-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--nq-border); border-radius: var(--nq-radius-sm); font-size: 13px; }
.nq-plan-limit-list li span { color: var(--nq-muted); white-space: nowrap; }
.nq-plan-limit .nq-plan-limit-hint { font-size: 13px; }
.nq-plan-limit .hm-btn { height: 36px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-width: 120px; }
.nq-plan-devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 8px; }
.nq-plan-devices h4 { font-size: 14px; font-weight: 600; margin: 0 0 10px; display: flex; justify-content: space-between; }
.nq-plan-devices h4 span { color: var(--nq-muted); font-weight: 500; }
.nq-plan-dev { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--nq-border); border-radius: var(--nq-radius-md); margin-bottom: 8px; }
.nq-plan-dev-info { flex: 1; min-width: 0; }
.nq-plan-dev-info b { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nq-plan-dev-info span { font-size: 12px; color: var(--nq-muted); }
.nq-plan-dev .hm-btn { height: 32px; display: inline-flex; align-items: center; }
.nq-plan-dev-empty { font-size: 13px; color: var(--nq-muted); padding: 8px 0; }
.nq-plan-ai-meter { margin-top: 6px; height: 6px; border-radius: 3px; background: var(--nq-border-soft); overflow: hidden; max-width: 320px; }
.nq-plan-ai-meter i { display: block; height: 100%; background: var(--nq-primary); }
.nq-plan-ai-meter.is-full i { background: var(--nq-danger); }
.nq-plan-admin { width: 100%; font-size: 13px; border-collapse: collapse; }
.nq-plan-admin th, .nq-plan-admin td { padding: 8px 10px; border-bottom: 1px solid var(--nq-border-soft); text-align: left; }
.nq-plan-admin th { color: var(--nq-muted); font-weight: 500; }
.nq-plan-admin select { height: 32px; width: auto; min-width: 140px; }
.nq-plan-price.is-free { text-align: right; white-space: normal; }
.nq-plan-price.is-free .nq-plan-old { display: block; color: var(--nq-muted); text-decoration: line-through; font-size: 15px; }
.nq-plan-price.is-free b { display: block; color: var(--nq-primary); }
.nq-plan-price.is-free .nq-plan-save { display: block; font-size: 13px; color: var(--nq-text-2); max-width: 280px; margin-left: auto; }
@media (max-width: 575.98px) { .nq-plan-price.is-free { text-align: left; } .nq-plan-price.is-free .nq-plan-save { margin-left: 0; } }

/* AI waiter voice (panel: AI Waiter) */
.ai-voice { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--nq-border,#e5e7eb); display: flex; flex-direction: column; gap: 14px; }
.ai-voice-title { font-size: 16px; font-weight: 600; margin: 0; }
.ai-voice .lang-hint { margin: -8px 0 0; }
.ai-voice-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: center; gap: 12px; }
.ai-voice .ai-voice-label { display: block; font-size: 13px; font-weight: 600; color: var(--nq-text-2,#374151); margin: 0; }
.ai-voice-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-voice label.ai-voice-pill { position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 128px; height: 40px; padding: 0 7px 0 20px; border: 1px solid var(--nq-border-strong,#d1d5db); border-radius: 20px; background: var(--nq-surface,#fff); font-size: 14px; line-height: 1; cursor: pointer; margin: 0; user-select: none; transition: border-color .15s, background .15s; }
.ai-voice label.ai-voice-pill > span { display: block; line-height: 1; }
.ai-voice label.ai-voice-pill:not(:has(.ai-voice-play)) { justify-content: center; min-width: 150px; padding: 0 22px; }
.ai-voice label.ai-voice-pill:hover { border-color: var(--nq-primary,#14806e); }
.ai-voice label.ai-voice-pill input { position: absolute; opacity: 0; pointer-events: none; }
.ai-voice label.ai-voice-pill:has(input:checked) { border-color: var(--nq-primary,#14806e); background: var(--nq-primary-50,#e8f5f3); color: var(--nq-primary-dark,#0f6b5c); font-weight: 600; }
.ai-voice label.ai-voice-pill:has(input:focus-visible) { outline: 2px solid var(--nq-primary,#14806e); outline-offset: 2px; }
.ai-voice button.ai-voice-play { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; box-sizing: border-box; width: 28px; height: 28px; min-width: 0; min-height: 0 !important; margin: 0; padding: 0; line-height: 1; box-shadow: none; border: 0; border-radius: 50%; background: var(--nq-primary-100,#cdeae7); color: var(--nq-primary-dark,#0f6b5c); cursor: pointer; }
.ai-voice button.ai-voice-play:hover { background: var(--nq-primary,#14806e); color: #fff; }
.ai-voice button.ai-voice-play .i-stop { display: none; }
.ai-voice button.ai-voice-play.is-playing .i-play { display: none; }
.ai-voice button.ai-voice-play.is-playing .i-stop { display: block; }
.ai-voice button.ai-voice-play.is-loading { animation: aiVoicePulse 1s ease-in-out infinite; }
@keyframes aiVoicePulse { 50% { opacity: .4; } }
.ai-voice-speed { display: flex; align-items: center; gap: 12px; max-width: 360px; }
.ai-voice-speed input[type="range"] { flex: 1; min-width: 0; accent-color: var(--nq-primary,#14806e); }
.ai-voice-speed output { min-width: 52px; font-variant-numeric: tabular-nums; font-weight: 600; }
.ai-voice-save { align-self: flex-start; height: 36px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--nq-primary,#14806e); background: var(--nq-primary,#14806e); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.ai-voice-save:hover { background: var(--nq-primary-dark,#0f6b5c); }
.ai-voice-save:disabled { opacity: .6; cursor: default; }
@media (max-width: 640px) {
  .ai-voice-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ai-voice-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
  .ai-voice-langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ai-voice label.ai-voice-lang { min-width: 0; }
  .ai-voice label.ai-voice-pill { min-width: 0; gap: 4px; padding: 0 5px 0 10px; font-size: 13px; }
  .ai-voice label.ai-voice-pill:not(:has(.ai-voice-play)) { min-width: 0; padding: 0 4px; font-size: 12.5px; }
  .ai-voice button.ai-voice-play { flex-basis: 26px; width: 26px; height: 26px; }
}
.ai-voice-langs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ai-voice .ai-voice-lang-code { font-size: 12.5px; font-weight: 700; line-height: 1; }
.ai-voice .ai-voice-lang-voice { font-size: 11px; font-weight: 500; line-height: 1; opacity: .75; }
.ai-voice label.ai-voice-lang { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative; min-width: 64px; height: 44px; padding: 0 10px; margin: 0; border: 1px solid var(--nq-border-strong,#d1d5db); border-radius: 8px; background: var(--nq-surface,#fff); font-size: 12.5px; font-weight: 600; line-height: 1; cursor: pointer; user-select: none; }
.ai-voice label.ai-voice-lang input { position: absolute; opacity: 0; pointer-events: none; }
.ai-voice label.ai-voice-lang:hover { border-color: var(--nq-primary,#14806e); }
.ai-voice label.ai-voice-lang:has(input:checked) { border-color: var(--nq-primary,#14806e); background: var(--nq-primary,#14806e); color: #fff; }
.ai-voice label.ai-voice-lang:has(input:focus-visible) { outline: 2px solid var(--nq-primary,#14806e); outline-offset: 2px; }

/* «Чеки»: the archive of bills (templates/js/receipts-archive.js) */
.ra-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-bottom: 12px; }
.ra-filters .form-label-sm { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--nq-text-2,#374151); }
.ra-filters input, .ra-filters select { width: 170px; }
.ra-sums { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ra-sum { display: flex; flex-direction: column; min-width: 170px; padding: 8px 14px; border: 1px solid var(--nq-border,#e5e7eb); border-radius: 12px; font-size: 12.5px; color: var(--nq-text-2,#374151); }
.ra-sum b { font-size: 18px; color: var(--nq-text,#111827); }
.ra-row { cursor: pointer; }
.ra-row:hover td { background: var(--nq-subtle,#f9fafb); }
.ra-num { font-weight: 600; white-space: nowrap; }
.ra-st { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ra-st.st-paid { background: #d1fae5; color: #065f46; }
.ra-st.st-unpaid { background: #fef3c7; color: #92400e; }
.ra-st.st-void { background: #fee2e2; color: #991b1b; }
.ra-act { text-align: right; white-space: nowrap; }
.ra-detail td { background: var(--nq-subtle,#f9fafb); padding: 8px 14px; }
.ra-line { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; font-size: 13.5px; max-width: 520px; }
.ra-extra { margin: 6px 0 0; font-size: 12.5px; color: var(--nq-muted,#6b7280); }
.ra-more { margin-top: 10px; }
#receiptsArchive { min-width: 0; max-width: 100%; }
#receiptsArchive .tbl-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .ra-filters input, .ra-filters select { width: 100%; } .ra-filters .form-label-sm { width: 100%; } .ra-sum { flex: 1 1 100%; } }

/* Menu item groups (templates/js/menu-groups.js) */
.mg-box { max-width: 520px; }
.mg-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; margin: 8px 0; }
.mg-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--nq-border,#e5e7eb); border-radius: 10px; }
.mg-row b { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.mg-del { color: #b91c1c; }
.branch-pin-toggle { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: 14px; font-weight: 600; cursor: pointer; }
.branch-pin-toggle input { width: 18px; height: 18px; }

/* ---- NOQTA TERMINAL extras (2026-11-09) ---- */
.term-bg { display: grid; gap: 6px; justify-items: start; }
.term-bg-thumb { height: 36px; width: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--nq-border,#e5e7eb); }
.nq-pin-page.has-bg { background-size: cover; background-position: center; }
.nq-pin-page.has-bg::before { content: ''; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); pointer-events: none; }
.nq-pin-page.has-bg .nq-pin-wrap { position: relative; }
.nq-fiscal-alert { position: sticky; top: 0; z-index: 2000; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fef3c7; color: #92400e; font-size: 14px; font-weight: 600; border-bottom: 1px solid #fcd34d; }
.nq-fiscal-alert.is-over { background: #fee2e2; color: #991b1b; border-bottom-color: #fca5a5; }
.nq-fiscal-alert span { flex: 1; }
.nq-fiscal-alert button { border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.hall-card.is-idle { border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239, 68, 68, .35); }
.hall-card.is-idle .hall-card-time { color: #dc2626; font-weight: 700; }
.hm-idle-h { margin-top: 18px; }
.hm-idle-select { width: auto !important; min-width: 160px; height: 36px; }
.overview-onshift-meta { color: var(--nq-text-2); font-size: 13px; margin-left: 8px; }

.cs-emp-h { margin: 16px 0 6px; font-size: 15px; font-weight: 700; }
.cs-emp-table th { font-size: 12px; font-weight: 600; color: var(--nq-text-2); text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.cs-emp-table th.num, .cs-emp-table td.num { text-align: right; white-space: nowrap; }
.cs-emp-table td.cs-emp-total { font-weight: 700; }
.cs-rep-sub { margin: 12px 0 4px; font-size: 14px; font-weight: 700; }

/* Menu → Categories: order by ⋮⋮ drag and ↑ ↓ (2026-11-13) */
.category-order-hint { display: block; margin: 0 0 .75rem; }
.category-list .category-item { align-items: center; }
.category-list .category-item .category-item-names { flex: 1 1 200px; min-width: 0; }
.category-list .category-item .category-drag { cursor: grab; user-select: none; color: var(--nq-text-3,#9ca3af); font-size: 1.05rem; line-height: 1; letter-spacing: -2px; padding: .35rem .25rem; border-radius: .4rem; flex: 0 0 auto; }
.category-list .category-item .category-drag:hover { color: var(--nq-text,#111827); background: var(--nq-subtle,#f3f4f6); }
.category-list .category-item .category-drag:active { cursor: grabbing; }
.category-list .category-item.is-dragging { opacity: .45; outline: 2px dashed #14806e; outline-offset: 2px; }
.category-list .category-item .branch-actions button.category-up,
.category-list .category-item .branch-actions button.category-down { padding: .45rem .7rem; min-width: 2.2rem; font-weight: 700; }
