/* Мобильная главная ReStar и нижняя навигация телефона (до 768 px). Внешний вид — по макету владельца от 11.11.2026:
   светлый фон, белые карточки с мягкой тенью, жирные цифры и заголовки, оранжевая карточка выручки, оранжевый активный переключатель. */
:root {
  --rsd-bg: #f6f7f5; --rsd-card: #ffffff; --rsd-line: #eef0f2; --rsd-text: #111111; --rsd-muted: #6b7280; --rsd-cell: #f2f3f5;
  --rsd-orange: #ff7a1a; --rsd-orange2: #ff9a42; --rsd-orange-soft: #fff1e6; --rsd-green: #16a34a; --rsd-green-soft: #e8f7ee;
  --rsd-red: #e5383b; --rsd-red-soft: #fdecec; --rsd-blue: #2f6fed; --rsd-blue-soft: #e9f0fe; --rsd-violet: #8b3dff; --rsd-violet-soft: #f3ebff;
  --rsd-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 10px rgba(16, 24, 40, .05);
}
body.dark-only { --rsd-bg: #141517; --rsd-card: #1e2023; --rsd-line: #2b2e33; --rsd-text: #f3f4f6; --rsd-muted: #9aa1ab; --rsd-cell: #26292e;
  --rsd-orange-soft: #3a2615; --rsd-green-soft: #16301f; --rsd-red-soft: #3a1c1c; --rsd-blue-soft: #1a2640; --rsd-violet-soft: #2a1f3f; --rsd-shadow: none; }

@media (max-width: 767.98px) {
  /* Шапка как на макете: тёмная «гамбургер»-кнопка, логотип, круглые серые кнопки поиска, уведомлений и темы, аватар. */
  html body .page-wrapper .page-header { height: 56px; min-height: 56px; box-shadow: none; border-bottom: 1px solid var(--rsd-line); background: var(--rsd-card); }
  html body .page-wrapper .page-header .header-wrapper { padding: 0 14px 0 12px !important; min-height: 56px; height: 56px; align-items: center; }
  html body .page-wrapper .page-header .toggle-sidebar svg { stroke: var(--rsd-text) !important; color: var(--rsd-text) !important; width: 22px; height: 22px; stroke-width: 2; }
  html body .page-wrapper .page-header .toggle-sidebar { gap: 10px; }
  html body .page-wrapper .page-header .toggle-sidebar img { max-height: 28px; width: auto; }
  html body .page-wrapper .page-header .nav-right .profile-media .user-name-hide { display: none !important; }
  html body .page-wrapper .page-header .nav-right .nav-menus > li:has(app-notifications) { display: flex !important; }
  html body .page-wrapper .page-header .nav-right .nav-menus > li { padding: 0 !important; margin-left: 8px !important; background: none !important;
    width: auto !important; height: auto !important; border-radius: 0 !important; }
  html body .page-wrapper .page-header .nav-right .nav-menus > li.profile-nav { margin-right: 2px !important; }
  html body .page-wrapper .page-header .nav-right .nav-menus .header-search, html body .page-wrapper .page-header .nav-right .nav-menus .notification-box,
  html body .page-wrapper .page-header .nav-right .nav-menus .mode {
    position: relative; width: 32px !important; height: 32px !important; border-radius: 50% !important; display: inline-flex !important; align-items: center; justify-content: center;
    background: #f3f4f6 !important; padding: 0 !important; margin: 0 !important; }
  body.dark-only .page-wrapper .page-header .nav-right .nav-menus .header-search, body.dark-only .page-wrapper .page-header .nav-right .nav-menus .notification-box,
  body.dark-only .page-wrapper .page-header .nav-right .nav-menus .mode { background: var(--rsd-cell) !important; }
  html body .page-wrapper .page-header .nav-right .nav-menus .header-search::before, html body .page-wrapper .page-header .nav-right .nav-menus .header-search::after,
  html body .page-wrapper .page-header .nav-right .nav-menus .notification-box::before, html body .page-wrapper .page-header .nav-right .nav-menus .notification-box::after,
  html body .page-wrapper .page-header .nav-right .nav-menus .mode::before, html body .page-wrapper .page-header .nav-right .nav-menus .mode::after { display: none !important; }
  html body .page-wrapper .page-header .nav-right .nav-menus i { font-size: 16.5px; line-height: 1; color: var(--rsd-text); }
  html body .page-wrapper .page-header .nav-right .nav-menus .mode svg { width: 16.5px; height: 16.5px; color: var(--rsd-text); stroke: var(--rsd-text); }
  html body .page-wrapper .page-header .nav-right .profile-media .user-profile { width: 32px !important; height: 32px !important; font-size: 14px !important; line-height: 32px; }
  html body .page-wrapper .page-header .nav-right .profile-media .alert-mode-dot { width: 9px !important; height: 9px !important; right: -1px !important; bottom: -1px !important; border-width: 2px !important; }
  .rsd-badge { position: absolute; top: -4px; right: -5px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--rsd-red); color: #fff;
    font: 700 9.5px/15px var(--restar-font, Inter, sans-serif); text-align: center; border: 2px solid var(--rsd-card); box-sizing: content-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .demo-native-links { display: none !important; } /* на телефоне полоска демо уходила под шапку */
  html body .page-wrapper.compact-wrapper .page-body-wrapper div.page-body, html body .page-wrapper .page-body-wrapper div.page-body { margin-top: 56px !important; }
  html body .tap-top { display: none !important; }

  /* Нижнее меню как на макете: Главная · Заказы · Каталог · Клиенты · Ещё, активный пункт — оранжевая заливка. */
  body.rsd-navon app-bottom-nav { display: none !important; }
  /* Плавающая панель как на наброске владельца: белая, скругление 22, отступ от краёв, мягкая тень, активный пункт — персиковая подложка. */
  #rsd-nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 1030; height: 64px;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px;
    background: #fff; border: 1px solid #eeeeee; border-radius: 22px; font-family: var(--restar-font, Inter, sans-serif);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .10), 0 2px 6px rgba(16, 24, 40, .05); }
  body.dark-only #rsd-nav { background: var(--rsd-card); border-color: var(--rsd-line); box-shadow: 0 10px 28px rgba(0, 0, 0, .4); }
  #rsd-nav a, #rsd-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; height: 100%;
    padding: 0; border: 0; border-radius: 16px; background: none; color: #6b7280; font-size: 11.5px; font-weight: 500; line-height: 1.1;
    text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color .15s, color .15s; }
  #rsd-nav svg { width: 23px; height: 23px; flex: none; }
  #rsd-nav span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  #rsd-nav .on { background: #fff1e6; color: #ff812b; font-weight: 600; }
  body.dark-only #rsd-nav .on { background: var(--rsd-orange-soft); }
  #rsd-nav a:active, #rsd-nav button:active { background: #f4f5f6; }

  body.rsd-on app-dashboard, body.rsd-on .page-crumbs-mobile { display: none !important; }
  body.rsd-on .page-body { background: var(--rsd-bg); }
  body.rsd-on .page-body-main { padding: 0 12px !important; }
  /* Запас под плавающую панель: последний блок докручивается и не прячется за ней. */
  body.rsd-navon .page-body-main::after { content: ''; display: block; height: calc(28px + env(safe-area-inset-bottom)); }
  body.rsd-navon .sidebar-links { padding-bottom: calc(46px + env(safe-area-inset-bottom)) !important; }
  body.rsd-noscroll { overflow: hidden; }
}

.rsd { font-family: var(--restar-font, Inter, system-ui, sans-serif); color: var(--rsd-text); display: flex; flex-direction: column; gap: 12px; padding: 14px 0 10px;
  -webkit-font-smoothing: antialiased; }
.rsd h1, .rsd h2, .rsd h3, .rsd h4 { margin: 0; color: var(--rsd-text); text-transform: none; letter-spacing: -0.02em; }
.rsd b { font-weight: 700; letter-spacing: -0.02em; }
/* У темы панели у small отступ слева 10 px — из-за него подписи съезжали вправо. */
.rsd small, .rsd-sheet-host small { color: var(--rsd-muted); font-weight: 400; padding: 0 !important; margin: 0; }
.rsd button { font: inherit; color: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
.rsd-loading { padding: 40px 0; text-align: center; color: var(--rsd-muted); }
.rsd-card { background: var(--rsd-card); border: 1px solid var(--rsd-line); border-radius: 18px; box-shadow: var(--rsd-shadow); }

/* Иконки в цветных скруглённых квадратах */
.rsd-sq { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 19px; }
.rsd-sq-blue { background: var(--rsd-blue-soft); color: var(--rsd-blue); }
.rsd-sq-orange { background: var(--rsd-orange-soft); color: var(--rsd-orange); }
.rsd-sq-green { background: var(--rsd-green-soft); color: var(--rsd-green); }
.rsd-sq-red { background: var(--rsd-red-soft); color: var(--rsd-red); }
.rsd-sq-violet { background: var(--rsd-violet-soft); color: var(--rsd-violet); }
.rsd-sq-glass { background: rgba(255, 255, 255, .25); color: #fff; }

/* Заголовок и выбор даты */
.rsd-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 4px; }
.rsd-head > div { display: contents; }
.rsd-head h1 { grid-column: 1; grid-row: 1; }
.rsd-head p { grid-column: 1 / -1; grid-row: 2; }
.rsd-date { grid-column: 2; grid-row: 1; }
.rsd-head h1 { font-size: 26px; font-weight: 700; line-height: 1.15; }
.rsd-head > div { min-width: 0; }
.rsd-head p { margin: 0; color: var(--rsd-muted); font-size: 14px; line-height: 1.3; }
.rsd-date { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; margin: 0; border-radius: 14px; flex: none;
  background: var(--rsd-card); border: 1px solid #e6e8eb; box-shadow: var(--rsd-shadow); font-size: 14px; font-weight: 500; white-space: nowrap; }
.rsd-date i { font-size: 18px; }
.rsd-date i:last-of-type { font-size: 18px; color: var(--rsd-text); }
.rsd-date select, .rsd-dyn-title select { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }

/* Статусы заказов: одна карточка, четыре части с перегородками */
.rsd-ops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px 2px; }
.rsd-op { display: flex; align-items: center; gap: 4px; padding: 0 3px; border: 0; background: none; min-width: 0; }
/* Статусы: значок и число в строку, подпись — под ними во всю ширину ячейки (шрифт Inter шире, чем на макете). */
.rsd-ops:not(.rsd-ops-2) .rsd-op { display: grid; grid-template-columns: auto 1fr; column-gap: 6px; row-gap: 3px; align-items: center; padding: 0 6px; }
.rsd-ops:not(.rsd-ops-2) .rsd-op > span:not(.rsd-sq) { display: contents; }
.rsd-ops:not(.rsd-ops-2) .rsd-op small { grid-column: 1 / -1; font-size: 11.5px; }
.rsd-op + .rsd-op { border-left: 1px solid var(--rsd-line); }
.rsd-op .rsd-sq { width: 26px; height: 26px; border-radius: 8px; font-size: 15px; }
.rsd-op .rsd-sq svg { width: 16px; height: 16px; }
.rsd-op > span:not(.rsd-sq):not(.rsd-pill) { display: flex; flex-direction: column; min-width: 0; overflow: visible; }
.rsd-op b { font-size: 21px; line-height: 1.05; }
.rsd-op small { font-size: 10.5px; white-space: nowrap; letter-spacing: -0.01em; }
.rsd-ops-2 { grid-template-columns: 1fr 1fr; padding: 10px 4px; }
.rsd-ops-2 .rsd-op { gap: 9px; padding: 0 10px; }
.rsd-ops-2 .rsd-op .rsd-sq { width: 32px; height: 32px; border-radius: 10px; font-size: 18px; }
.rsd-ops-2 .rsd-op b { font-size: 20px; }
.rsd-op-num { display: flex; align-items: center; gap: 6px; }
.rsd-op-num .rsd-pill { height: 20px; padding: 0 6px; font-size: 11.5px; }
.rsd-ops-2 .rsd-op small { font-size: 12px; }

/* Показатели: выручка — оранжевая, заказы и средний чек — белые */
.rsd-kpis { display: grid; grid-template-columns: 1.36fr 0.9fr 1.27fr; gap: 8px; }
.rsd-kpi { display: flex; flex-direction: column; gap: 6px; padding: 11px 8px; min-height: 104px; border-radius: 18px; min-width: 0;
  background: var(--rsd-card); border: 1px solid var(--rsd-line); box-shadow: var(--rsd-shadow); }
.rsd-kpi-head { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; white-space: nowrap; min-width: 0; }
.rsd-kpi-head > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.rsd-kpi .rsd-sq { width: 22px; height: 22px; border-radius: 7px; font-size: 13px; }
.rsd-kpi > b { font-size: 22px; line-height: 1.1; white-space: nowrap; }
.rsd-kpi-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; margin-top: auto; min-width: 0; }
.rsd-kpi-foot .rsd-pill { height: 22px; padding: 0 6px; font-size: 12px; }
.rsd-kpi-foot .rsd-pill i { font-size: 13px; }
.rsd-kpi-main { position: relative; overflow: hidden; border: 0; color: #fff; cursor: pointer;
  background: radial-gradient(120% 90% at 100% 100%, rgba(255, 255, 255, .22) 0 30%, transparent 31%),
    radial-gradient(90% 70% at 85% 115%, rgba(255, 255, 255, .16) 0 45%, transparent 46%), linear-gradient(135deg, var(--rsd-orange) 0%, var(--rsd-orange2) 100%);
  box-shadow: 0 6px 16px rgba(255, 122, 26, .28); }
.rsd-kpi-main .rsd-kpi-head, .rsd-kpi-main > b { color: #fff; }
.rsd-cmp { border: 0; background: none; padding: 0; color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Плашки изменения */
.rsd-pill { display: inline-flex; align-items: center; gap: 2px; height: 23px; padding: 0 7px; border-radius: 12px; font-size: 12.5px; font-weight: 600;
  background: var(--rsd-cell); color: var(--rsd-muted); white-space: nowrap; flex: none; }
.rsd-pill i { font-size: 14px; }
.rsd-pill-up { background: var(--rsd-green-soft); color: var(--rsd-green); }
.rsd-pill-down { background: var(--rsd-red-soft); color: var(--rsd-red); }
.rsd-pill-white { background: #fff; }
.rsd-pill-white:not(.rsd-pill-up):not(.rsd-pill-down) { color: var(--rsd-muted); }
.rsd-pill-wide { height: 28px; padding: 0 10px; border-radius: 14px; font-weight: 500; font-size: 12.5px; }

/* Динамика */
.rsd-dyn { padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.rsd-dyn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rsd-dyn-title { position: relative; display: inline-flex; align-items: center; gap: 3px; margin: 0 0 0 -6px; min-width: 0; padding: 4px 6px; border: 0; border-radius: 10px;
  background: none; color: var(--rsd-text); -webkit-tap-highlight-color: transparent; transition: background-color .15s; }
.rsd-dyn-title:active, .rsd-dyn-title.rsd-open { background: var(--rsd-cell); }
.rsd-dyn-title i { transition: transform .2s; }
.rsd-dyn-title.rsd-open i { transform: rotate(180deg); }
.rsd-dyn-title h2 { font-size: 15.5px; font-weight: 600; white-space: nowrap; letter-spacing: -0.01em; }
.rsd-dyn-title i { font-size: 16px; color: var(--rsd-muted); }
.rsd-seg { display: inline-flex; flex: none; background: #f1f2f4; border-radius: 13px; padding: 3px; }
body.dark-only .rsd-seg { background: var(--rsd-cell); }
.rsd-seg button { border: 0; background: none; padding: 6px 10px; border-radius: 10px; font-size: 13px; font-weight: 500; color: #6b7280; }
.rsd-seg .on { color: #fff; background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); box-shadow: 0 2px 6px rgba(255, 122, 26, .3); }

.rsd-chart { position: relative; }
.rsd-chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.rsd-grid { stroke: #eceef1; stroke-dasharray: 4 4; }
.rsd-axis { font-size: 10.5px; fill: #6b7280; font-family: var(--restar-font, Inter, sans-serif); }
.rsd-axis-on { fill: var(--rsd-text); font-weight: 600; }
.rsd-line { fill: none; stroke: var(--rsd-orange); stroke-width: 2.6; stroke-linecap: round; }
.rsd-dot { fill: #fff; stroke: var(--rsd-orange); stroke-width: 2.2; }
.rsd-dot-on { fill: var(--rsd-orange); }
.rsd-cursor { stroke: var(--rsd-orange); stroke-opacity: .35; stroke-dasharray: 3 3; }
.rsd-tip { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; border: 0;
  background: var(--rsd-card); box-shadow: 0 6px 18px rgba(16, 24, 40, .12); }
.rsd-tip span { font-size: 12px; color: var(--rsd-muted); white-space: nowrap; }
.rsd-tip b { font-size: 16px; white-space: nowrap; }

.rsd-cal { border: 1px solid var(--rsd-line); border-radius: 16px; padding: 10px 10px 12px; }
.rsd-cal-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 600; padding: 0 0 10px; }
.rsd-arrow { width: 34px; height: 34px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; color: var(--rsd-text); }
.rsd-arrow:disabled { opacity: .25; }
.rsd-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.rsd-wd { text-align: center; font-size: 13px; color: var(--rsd-muted); padding-bottom: 4px; }
.rsd-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 40px; border-radius: 10px; min-width: 0;
  background: var(--rsd-cell); border: 1.5px solid transparent; padding: 3px 0; text-align: center !important; }
body.dark-only .rsd-cell { background: var(--rsd-cell); }
.rsd-cell b { font-size: 14.5px; line-height: 1.15; font-weight: 560; letter-spacing: -0.01em; }
.rsd-cell small { display: block; width: 100%; text-align: center; font-size: 11px; line-height: 1.15; color: #8a8f98 !important; letter-spacing: -0.01em; }
.rsd-cell-void { background: none; }
.rsd-cell-picked { border-color: var(--rsd-orange); background: var(--rsd-card); }
.rsd-cell-today { background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); box-shadow: 0 2px 6px rgba(255, 122, 26, .25); }
.rsd-cell-today.rsd-cell-picked, .rsd-cell-today { border-color: transparent; }
.rsd-cell-today b, .rsd-cell-today small { color: #fff !important; }
.rsd-daysum { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; padding: 12px 12px; border: 0; border-radius: 16px; background: #fff4ec; }
body.dark-only .rsd-daysum { background: var(--rsd-orange-soft); }
.rsd-daysum > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rsd-daysum small { font-size: 13px; color: var(--rsd-text); white-space: nowrap; }
.rsd-daysum b { font-size: 23px; }

/* Требует внимания — в оформлении карточек макета */
.rsd-attn { padding: 14px; display: flex; flex-direction: column; }
.rsd-attn h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.rsd-attn-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border: 0; background: none; border-top: 1px solid var(--rsd-line); }
.rsd-attn-row:first-of-type { border-top: 0; }
.rsd-attn-row > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rsd-attn-row b { font-size: 14.5px; font-weight: 600; }
.rsd-attn-row small { font-size: 12.5px; }
.rsd-attn-row > i { color: var(--rsd-muted); font-size: 20px; }

/* Быстрые действия */
.rsd-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rsd-q { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; padding: 10px 4px 12px; font-size: 14px; font-weight: 500;
  text-align: center !important; line-height: 1.22; min-height: 84px; border-radius: 16px; color: var(--rsd-text); }
.rsd-q > span:last-child { flex: 1; display: flex; align-items: center; justify-content: center; }
.rsd-q .rsd-sq { width: 36px; height: 36px; border-radius: 11px; font-size: 21px; }
.rsd-q .rsd-sq i { font-size: 21px; }
.rsd-q .rsd-sq-orange i, .rsd-q .rsd-sq-violet i { font-size: 22px; }
.rsd-cartoff { position: relative; display: inline-flex; line-height: 1; }
.rsd-cartoff i:first-child { font-size: 20px !important; }
.rsd-cartoff i:last-child { position: absolute; right: -6px; bottom: -3px; font-size: 11px !important; line-height: 1; color: var(--rsd-red); background: var(--rsd-green-soft); border-radius: 50%; }

/* Окно дня */
.rsd-sheet-host { position: fixed; inset: 0; z-index: 1060; }
.rsd-sheet-back { position: absolute; inset: 0; background: rgba(17, 24, 39, .35); }
.rsd-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 84vh; overflow-y: auto; background: var(--rsd-card); border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: rsd-up .18s ease-out; }
@keyframes rsd-up { from { transform: translateY(24px); } } /* без проявления: окно сразу непрозрачное */
.rsd-still { animation: none !important; }
.rsd-sheet > * { flex-shrink: 0; } /* окно ограничено по высоте: блоки не сжимаются, лишнее прокручивается */
.rsd-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--rsd-line); margin: 0 auto; }
.rsd-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; }
.rsd-sheet-head small { font-size: 13px; }
.rsd-sheet-head h3 { font-size: 28px; font-weight: 700; margin-top: 2px; }
.rsd-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f3f4f6; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.rsd-sheet-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsd-sheet-kpi > div { background: var(--rsd-cell); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rsd-sheet-kpi small { font-size: 12px; }
.rsd-sheet-kpi b { font-size: 17px; }
.rsd-sheet-kpi .rsd-pill { height: 20px; font-size: 11.5px; padding: 0 6px; background: var(--rsd-card); }
.rsd-sheet-note { margin: -2px 0 0; font-size: 12.5px; color: var(--rsd-muted); }
.rsd-sheet-block h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.rsd-bar { display: grid; grid-template-columns: 88px 1fr 28px; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.rsd-bar-track { height: 8px; border-radius: 4px; background: var(--rsd-cell); overflow: hidden; }
.rsd-bar-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--rsd-orange), var(--rsd-orange2)); border-radius: 4px; }
.rsd-bar b, .rsd-top b { text-align: right; font-size: 14px; }
.rsd-top { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; font-size: 14px; padding: 5px 0; }
.rsd-top > span:first-child { color: var(--rsd-muted); }
.rsd-btn { display: block; width: 100%; text-align: center !important; border: 0; border-radius: 14px; padding: 13px; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); color: #fff !important; }

/* Узкие телефоны (360–380 px): те же блоки, чуть мельче, чтобы ничего не наезжало и не обрезалось. */
@media (max-width: 380px) {
  html body .page-wrapper .page-header .nav-right .nav-menus .header-search, html body .page-wrapper .page-header .nav-right .nav-menus .notification-box,
  html body .page-wrapper .page-header .nav-right .nav-menus .mode, html body .page-wrapper .page-header .nav-right .profile-media .user-profile { width: 30px !important; height: 30px !important; }
  html body .page-wrapper .page-header .nav-right .nav-menus > li { margin-left: 7px !important; }
  html body .page-wrapper .page-header .toggle-sidebar img { max-height: 26px; }
  .rsd-head h1 { font-size: 23px; }
  .rsd-head p { font-size: 13px; }
  .rsd-date { height: 34px; padding: 0 8px; gap: 4px; font-size: 12.5px; border-radius: 12px; }
  .rsd-date i { font-size: 16px; }
  .rsd-kpis { grid-template-columns: 1.33fr 0.92fr 1.25fr; gap: 6px; }
  .rsd-kpi { padding: 10px 7px; }
  .rsd-kpi-head { font-size: 11.5px; gap: 3px; }
  .rsd-kpi .rsd-sq { width: 20px; height: 20px; font-size: 12px; border-radius: 6px; }
  .rsd-kpi > b { font-size: 19px; }
  .rsd-kpi-foot { gap: 3px; }
  .rsd-kpi-foot .rsd-pill { height: 20px; padding: 0 5px; font-size: 11px; }
  .rsd-cmp { font-size: 11px; }
  .rsd-op b { font-size: 19px; }
  .rsd-ops:not(.rsd-ops-2) .rsd-op small { font-size: 10.5px; }
  .rsd-ops-2 .rsd-op { gap: 7px; padding: 0 7px; }
  .rsd-ops-2 .rsd-op .rsd-sq { width: 28px; height: 28px; font-size: 16px; }
  .rsd-ops-2 .rsd-op b { font-size: 18px; }
  .rsd-ops-2 .rsd-op small { font-size: 11px; }
  .rsd-dyn-title h2 { font-size: 14.5px; }
  .rsd-seg button { padding: 5px 8px; font-size: 12px; }
  .rsd-cell b { font-size: 13.5px; }
  .rsd-cell small { font-size: 10px; }
  .rsd-daysum small { font-size: 12px; }
  .rsd-daysum b { font-size: 20px; }
  .rsd-pill-wide { font-size: 11.5px; padding: 0 8px; }
  .rsd-q { font-size: 12.5px; }
}


/* ---------- Окно выбора периода ---------- */
.rsd-ps { gap: 14px; font-family: var(--restar-font, Inter, system-ui, sans-serif); color: var(--rsd-text); }
.rsd-ps .rsd-sheet-head h3.rsd-ps-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.rsd-ps-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: #f1f2f4; border-radius: 14px; padding: 4px; }
body.dark-only .rsd-ps-presets { background: var(--rsd-cell); }
.rsd-ps-presets button { border: 0; background: none; border-radius: 10px; padding: 8px 2px; font-size: 13.5px; font-weight: 500; color: #4b5563; text-align: center; white-space: nowrap; }
.rsd-ps-presets .on { color: #fff; background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); box-shadow: 0 2px 6px rgba(255, 122, 26, .3); }
.rsd-ps-cal { border: 1px solid var(--rsd-line); border-radius: 16px; padding: 8px 8px 10px; }
.rsd-ps-cal .rsd-cal-head { padding-bottom: 6px; }
.rsd-ps-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.rsd-pc { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 40px; border: 1.5px solid transparent;
  background: var(--rsd-cell); border-radius: 10px; padding: 3px 0; text-align: center; color: var(--rsd-text); font: inherit; }
body.dark-only .rsd-pc { background: var(--rsd-cell); }
.rsd-pc b { font-size: 14px; font-weight: 560; line-height: 1.15; }
.rsd-pc small { display: block; width: 100%; text-align: center; font-size: 10.5px; line-height: 1.15; color: #8a8f98 !important; }
.rsd-pc-void { min-height: 0; background: none !important; }
.rsd-pc-off { background: #f8f9fa; }
.rsd-pc-off b { color: #b9bec5; font-weight: 500; }
.rsd-pc-today:not(.rsd-pc-in) { border-color: #ff8a3d; background: var(--rsd-card); }
.rsd-pc-today:not(.rsd-pc-in) b { color: var(--rsd-orange); }
/* Выбранный промежуток: светлая лента, края — оранжевые плашки */
.rsd-pc-in { background: #ffe9d9; }
body.dark-only .rsd-pc-in { background: var(--rsd-orange-soft); }
.rsd-pc-from, .rsd-pc-to { background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)) !important; }
.rsd-pc-from b, .rsd-pc-to b, .rsd-pc-from small, .rsd-pc-to small { color: #fff !important; }
.rsd-ps-hint { display: flex; align-items: center; gap: 6px; margin: -4px 2px 0; font-size: 12.5px; color: var(--rsd-muted); }
.rsd-ps-hint i { font-size: 15px; color: var(--rsd-orange); }
.rsd-ps-sum { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 1px; background: var(--rsd-line); border-radius: 14px; overflow: hidden; }
.rsd-ps-sum > div { background: #fff4ec; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.dark-only .rsd-ps-sum > div { background: var(--rsd-orange-soft); }
.rsd-ps-sum small { font-size: 12px; }
.rsd-ps-sum b { font-size: 17px; font-weight: 600; white-space: nowrap; }
.rsd-ps-cmp { display: flex; flex-direction: column; gap: 6px; }
.rsd-ps-cmp > small { font-size: 12.5px; }
.rsd-seg-full { display: grid; grid-template-columns: 1fr 1fr; }
.rsd-seg-full button { text-align: center; padding: 8px 6px; }
.rsd-seg-full button:disabled { opacity: .4; }
.rsd-ps-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.rsd-btn-ghost { border: 1px solid var(--rsd-line); background: var(--rsd-card); border-radius: 14px; padding: 12px; font-size: 15px; font-weight: 500; text-align: center; color: var(--rsd-text); }
.rsd-ps .rsd-btn { margin: 0; }
@media (max-width: 380px) {
  .rsd-ps-presets button { font-size: 12.5px; }
  .rsd-pc { min-height: 38px; }
  .rsd-pc b { font-size: 13px; }
  .rsd-pc small { font-size: 9.5px; }
  .rsd-ps-sum b { font-size: 15px; }
  .rsd-ps-sum > div { padding: 9px 10px; }
}

/* Крупный системный шрифт: у карточки, где подпись не влезает, значок прячется (класс ставит fit()). */
.rsd-tight .rsd-kpi-head .rsd-sq { display: none; }
.rsd-dyn-title { flex: 0 1 auto; }
.rsd-dyn-title h2 { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- Окно статусов заказов ----------
   Шапка и вкладки закреплены, прокручивается только список. Свайп вниз — закрыть, вверх или нажатие на полоску — раскрыть.
   Карточка: номер, тип, сумма · сколько ждёт · состав одной строкой · кнопка следующего шага. Подробности — по нажатию. */
.rsd-oz { padding: 0; gap: 0; overflow: hidden; border-radius: 24px 24px 0 0; height: 86vh; height: min(86dvh, calc(100dvh - 64px)); max-height: none;
  font-family: var(--restar-font, Inter, system-ui, sans-serif); color: var(--rsd-text); transition: max-height .25s ease, height .25s ease; }
.rsd-oz.rsd-oz-full { height: calc(100vh - 64px); height: calc(100dvh - 64px); max-height: none; }
.rsd-oz { background: var(--rsd-bg); }
.rsd-oz-top { flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; padding: 8px 16px 12px; background: var(--rsd-card); border-bottom: 1px solid var(--rsd-line);
  position: relative; z-index: 1; touch-action: none; transition: box-shadow .15s; }
.rsd-oz-top.rsd-oz-shade { box-shadow: 0 1px 0 var(--rsd-line), 0 8px 14px -10px rgba(16, 24, 40, .18); }
.rsd-oz .rsd-sheet-grip { display: flex; align-items: center; justify-content: center; width: 72px; height: 18px; margin: -4px auto -6px;
  padding: 0; border: 0; background: none; }
.rsd-oz .rsd-sheet-grip::before { content: ''; width: 40px; height: 4px; border-radius: 2px; background: #e2e4e8; }
body.dark-only .rsd-oz .rsd-sheet-grip::before { background: var(--rsd-line); }
.rsd-oz-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rsd-oz-title .rsd-sq { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
.rsd-oz-title .rsd-sq svg { width: 20px; height: 20px; }
.rsd-oz-title h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.rsd-oz-title small { display: block; margin-top: 1px !important; font-size: 13px; }
.rsd-oz .rsd-x { flex: none; }
body.dark-only .rsd-x { background: var(--rsd-cell); color: var(--rsd-text); }

/* Вкладки: одна строка «Новые 5»; если не влезают — число над подписью (класс ставит drawOps). */
.rsd-ot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: #f3f4f6; }
body.dark-only .rsd-ot { background: var(--rsd-cell); }
.rsd-ot button { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; height: 36px; padding: 0 4px; border: 0;
  border-radius: 11px; background: none; color: #4b5563; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden;
  -webkit-tap-highlight-color: transparent; transition: background-color .15s, color .15s; }
body.dark-only .rsd-ot button { color: var(--rsd-muted); }
.rsd-ot b { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rsd-card); color: var(--rsd-text);
  font-size: 11.5px; font-weight: 600; line-height: 18px; text-align: center; }
.rsd-ot .on { background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); color: #fff !important; box-shadow: 0 2px 6px rgba(255, 122, 26, .3); }
.rsd-ot .on b { background: rgba(255, 255, 255, .28); color: #fff; }
.rsd-ot-alert:not(.on) b { background: var(--rsd-red); color: #fff; }
.rsd-ot-stack button { flex-direction: column; gap: 0; height: 48px; }
.rsd-ot-stack b { order: -1; min-width: 0; height: auto; padding: 0; background: none !important; font-size: 16px; line-height: 1.15; }
.rsd-ot-stack span { font-size: 11.5px; line-height: 1.2; }
.rsd-ot-stack .rsd-ot-alert:not(.on) b { color: var(--rsd-red); }

.rsd-oz-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.rsd-oz-list > * { flex-shrink: 0; }

/* Карточка заказа: белая на светло-сером фоне списка, одна мягкая кнопка справа — без сплошного оранжевого. */
.rsd-oc { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 12px 14px; border-radius: 16px; border: 1px solid #eceef1;
  background: var(--rsd-card); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); overflow: hidden; box-sizing: border-box; line-height: 1.25;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: height .2s ease, opacity .18s ease, margin .2s ease, padding .2s ease, border-width .2s ease; }
body.dark-only .rsd-oc { border-color: var(--rsd-line); box-shadow: none; }
.rsd-oc-leave { height: 0 !important; opacity: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -8px; border-width: 0; }
.rsd-oc-r1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rsd-oc-no { flex: none; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.rsd-oc-ch { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-size: 13px; color: var(--rsd-muted); }
.rsd-oc-ch i { flex: none; font-size: 15px; }
.rsd-oc-ch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rsd-oc-st { flex: none; font-size: 11.5px; font-weight: 500; padding: 2px 7px; border-radius: 7px; white-space: nowrap; background: var(--rsd-cell); color: var(--rsd-muted); }
.rsd-oc-st-0 { background: var(--rsd-blue-soft); color: var(--rsd-blue); }
.rsd-oc-st-1, .rsd-oc-st-2 { background: var(--rsd-orange-soft); color: var(--rsd-orange); }
.rsd-oc-st-3, .rsd-oc-st-4 { background: var(--rsd-green-soft); color: var(--rsd-green); }
.rsd-oc-sum { flex: none; margin-left: auto; font-size: 15.5px; font-weight: 600; white-space: nowrap; }
.rsd-oc-exp { flex: none; width: 26px; height: 26px; margin: -3px -6px -3px -2px; padding: 0; border: 0; border-radius: 8px; background: none;
  display: inline-flex; align-items: center; justify-content: center; color: var(--rsd-muted); font-size: 20px; }
.rsd-oc-exp i { transition: transform .2s; }
.rsd-oc-open .rsd-oc-exp i { transform: rotate(180deg); }
.rsd-oc-body { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rsd-oc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
/* Время заказа переносится на скрытую вторую строку, если не влезает рядом с плашкой — без обрезанного «1…». */
.rsd-oc-r2 { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; max-height: 22px; overflow: hidden; }
.rsd-oc-items { font-size: 13px; color: #4b5563; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rsd-oc-items em { font-style: normal; color: var(--rsd-muted); }
body.dark-only .rsd-oc-items { color: var(--rsd-muted); }
.rsd-oc-do { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 32px; padding: 0 13px;
  border: 1px solid transparent; border-radius: 10px; white-space: nowrap; font-size: 13.5px; font-weight: 400; letter-spacing: .01em; color: #f26a12;
  /* лёгкая кнопка: тонкая градиентная обводка и едва тёплая подложка */
  background: linear-gradient(180deg, #ffffff, #fff6ef) padding-box, linear-gradient(135deg, #ff7a1a, #ffbf80) border-box;
  box-shadow: 0 2px 6px -2px rgba(255, 122, 26, .25);
  -webkit-tap-highlight-color: transparent; transition: transform .1s, opacity .15s, box-shadow .15s; }
body.dark-only .rsd-oc-do { color: #ffa45c; background: linear-gradient(180deg, #262321, #2b241f) padding-box, linear-gradient(135deg, #ff7a1a, #ffbf80) border-box; }
.rsd-oc-do i { font-size: 15px; }
.rsd-oc-do svg { flex: none; }
.rsd-oc-do:active { transform: scale(.97); box-shadow: none; }
.rsd-oc-do:disabled { opacity: .5; }
.rsd-oc-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rsd-oc-links-1 { grid-template-columns: 1fr; }
.rsd-oc-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 0; border-radius: 10px;
  background: #f3f4f6; color: var(--rsd-text) !important; font-size: 13.5px; font-weight: 500; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.rsd-oc-link i { font-size: 16px; color: var(--rsd-muted); }
body.dark-only .rsd-oc-link { background: var(--rsd-cell); }
.rsd-tag { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--rsd-cell);
  color: #4b5563; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
body.dark-only .rsd-tag { color: var(--rsd-muted); }
.rsd-tag i { font-size: 14px; }
.rsd-tag-soon { background: var(--rsd-orange-soft); color: #c2580c; }
.rsd-tag-late { background: var(--rsd-red-soft); color: var(--rsd-red) !important; }
.rsd-oc-time { flex: none; font-size: 12.5px; line-height: 22px; color: var(--rsd-muted); white-space: nowrap; }
.rsd-oc-detail { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #f7f8f9; font-size: 13px;
  animation: rsd-fade .18s ease-out; }
@keyframes rsd-fade { from { transform: translateY(-4px); } }
.rsd-oc-line { display: flex; align-items: flex-start; gap: 7px; line-height: 1.35; color: var(--rsd-text); }
.rsd-oc-line i { flex: none; margin-top: 1px; font-size: 15px; color: var(--rsd-muted); }
.rsd-oc-line a { color: var(--rsd-orange); text-decoration: none; white-space: nowrap; }
.rsd-oc-note span { color: #92400e; }
body.dark-only .rsd-oc-note span { color: #fbbf77; }
.rsd-oc-cart { list-style: none; margin: 0; padding: 8px 0; border-top: 1px solid var(--rsd-line); border-bottom: 1px solid var(--rsd-line);
  display: flex; flex-direction: column; gap: 6px; }
.rsd-oc-cart li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; }
.rsd-oc-cart em { font-style: normal; font-size: 12.5px; color: var(--rsd-muted); }
.rsd-oc-cart b { font-weight: 500; white-space: nowrap; }
.rsd-oz-all { display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 2px; padding: 10px; border: 0; background: none;
  color: var(--rsd-orange); font-size: 14px; font-weight: 500; }
.rsd-oz-all i { font-size: 18px; }
.rsd-oz-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 0 12px; text-align: center; }
.rsd-oz-empty b { font-size: 15px; font-weight: 600; }
.rsd-oz-empty small { font-size: 13px; }
@media (max-width: 380px) {
  .rsd-oc { padding: 11px; }
  .rsd-oc-no { font-size: 15px; }
  .rsd-oc-sum { font-size: 15px; }
}

/* Уведомление после действия: «Заказ #358 принят · Отменить» */
.rsd-toast { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1080; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; background: #1f2328; color: #fff; font: 500 14px/1.3 var(--restar-font, Inter, sans-serif);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: rsd-toast .2s ease-out; }
@keyframes rsd-toast { from { transform: translateY(12px); } }
.rsd-toast i { flex: none; font-size: 19px; color: #4ade80; }
.rsd-toast-bad i { color: #f87171; }
.rsd-toast span { flex: 1; min-width: 0; }
.rsd-toast button { flex: none; border: 0; background: none; padding: 4px 2px; color: #ffb27a; font: inherit; font-weight: 600; }

/* Меню показателя динамики: карточка-поповер под заголовком, значки как у плиток показателей */
.rsd-mm-host { position: fixed; inset: 0; z-index: 1065; }
.rsd-mm small { padding: 0 !important; margin: 0; }
.rsd-mm { position: absolute; width: 252px; max-width: calc(100vw - 24px); padding: 6px; box-sizing: border-box; background: var(--rsd-card);
  border: 1px solid var(--rsd-line); border-radius: 16px; box-shadow: 0 14px 34px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .06);
  font-family: var(--restar-font, Inter, system-ui, sans-serif); color: var(--rsd-text); transform-origin: top left; animation: rsd-pop .16s ease-out; }
body.dark-only .rsd-mm { box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }
@keyframes rsd-pop { from { transform: translateY(-4px) scale(.98); } }
.rsd-mm-cap { display: block; padding: 6px 10px 6px !important; font-size: 12px; color: var(--rsd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsd-mm-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; border: 0; border-radius: 12px; background: none;
  text-align: left; color: var(--rsd-text); -webkit-tap-highlight-color: transparent; transition: background-color .12s; }
.rsd-mm-item:active { background: var(--rsd-cell); }
.rsd-mm-item .rsd-sq { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; flex: none; }
.rsd-mm-item span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rsd-mm-item b { font-size: 14.5px; font-weight: 500; line-height: 1.25; }
.rsd-mm-item small { font-size: 12.5px; color: var(--rsd-muted); white-space: nowrap; }
.rsd-mm-item.on { background: #fff4ec; }
.rsd-mm-item.on b { color: var(--rsd-text); }
body.dark-only .rsd-mm-item.on { background: var(--rsd-orange-soft); }
.rsd-mm-item svg { flex: none; color: var(--rsd-orange); }

/* Пока открыто боковое меню панели, нижняя панель уезжает вниз и не перекрывает его. */
#rsd-nav { transition: transform .22s ease; }
body:has(.sidebar-wrapper:not(.close_icon)) #rsd-nav { transform: translateY(calc(100% + 24px)); pointer-events: none; }

/* ---------- Меню разделов (нижнее окно) и круглая кнопка «Меню» по центру нижней панели ---------- */
@media (max-width: 767.98px) {
  /* Кнопка меню в шапке на телефоне не нужна: меню открывается снизу, куда достаёт большой палец. */
  /* Логотип в панели лежит внутри той же кнопки: прячем только значок, а нажатие по логотипу не открывает боковое меню. */
  html body .page-wrapper .page-header .toggle-sidebar > app-feather-icons, html body .page-wrapper .page-header .toggle-sidebar svg.sidebar-toggle { display: none !important; }
  html body .page-wrapper .page-header .toggle-sidebar { pointer-events: none; gap: 0 !important; }
}
#rsd-nav .rsd-nav-menu { color: var(--rsd-text); gap: 2px; justify-content: flex-end; padding-bottom: 7px; }
#rsd-nav .rsd-nav-fab { width: 48px; height: 48px; margin-top: -30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none;
  background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); color: #fff;
  box-shadow: 0 0 0 4px var(--rsd-card), 0 8px 18px rgba(255, 122, 26, .38); transition: transform .2s ease; }
#rsd-nav .rsd-nav-fab svg { width: 22px; height: 22px; transition: transform .25s ease; }
#rsd-nav .rsd-nav-menu:active .rsd-nav-fab { transform: scale(.94); }
#rsd-nav .rsd-nav-menu:active { background: none; }
body.rsd-mnon #rsd-nav .rsd-nav-fab svg { transform: rotate(45deg); }

.rsd-mn { padding: 0; gap: 0; overflow: hidden; border-radius: 24px 24px 0 0; height: 86vh; height: min(86dvh, calc(100dvh - 64px)); max-height: none;
  background: var(--rsd-bg); font-family: var(--restar-font, Inter, system-ui, sans-serif); color: var(--rsd-text); }
.rsd-mn small { padding: 0 !important; margin: 0; }
.rsd-mn-top { flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; padding: 8px 16px 12px; background: var(--rsd-card); border-bottom: 1px solid var(--rsd-line); }
.rsd-mn .rsd-sheet-head { touch-action: none; align-items: center; }
.rsd-mn .rsd-sheet-head h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.rsd-mn .rsd-sheet-grip { touch-action: none; }
body.dark-only .rsd-mn .rsd-x { background: var(--rsd-cell); color: var(--rsd-text); }
/* Заведение: заметное поле с оранжевым значком, как в наброске */
.rsd-mn-co { display: flex; align-items: center; gap: 10px; width: 100%; height: 52px; padding: 0 12px 0 8px; border: 1px solid var(--rsd-line); border-radius: 14px;
  background: var(--rsd-card); color: var(--rsd-text); text-align: left; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.rsd-mn-co-ic { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--rsd-orange-soft); color: var(--rsd-orange); }
.rsd-mn-co-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rsd-mn-co-t small { font-size: 11.5px; color: var(--rsd-muted); }
.rsd-mn-co-t b { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsd-mn-co > svg { flex: none; color: var(--rsd-muted); }
.rsd-mn-co:active { background: var(--rsd-cell); }
.rsd-mn-search { position: relative; display: flex; align-items: center; height: 44px; margin: 0; padding: 0 12px; gap: 8px; border-radius: 14px; background: #f3f4f6; cursor: text; }
body.dark-only .rsd-mn-search { background: var(--rsd-cell); }
.rsd-mn-search > i { font-size: 18px; color: var(--rsd-muted); flex: none; }
.rsd-mn-search input { flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0 !important; background: none !important; box-shadow: none !important;
  color: var(--rsd-text) !important; font: 400 16px/1 inherit; padding: 0 !important; margin: 0; border-radius: 0; }
.rsd-mn-search input::placeholder { color: #9aa1ab; }
.rsd-mn-search input::-webkit-search-cancel-button { display: none; }
.rsd-mn-search:focus-within { box-shadow: 0 0 0 1.5px rgba(255, 122, 26, .45); background: var(--rsd-card); }
.rsd-mn-clear { flex: none; border: 0; background: none; padding: 4px; color: #b3b8bf; font-size: 18px; display: inline-flex; }
.rsd-mn-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px calc(22px + env(safe-area-inset-bottom)); }
.rsd-mn-page { display: flex; flex-direction: column; animation: rsd-slide .18s ease-out; }
@keyframes rsd-slide { from { transform: translateX(10px); } }
.rsd-mn-h { margin: 14px 2px 10px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--rsd-text); }
.rsd-mn-cap { margin: 14px 2px 8px; font-size: 12.5px; color: var(--rsd-muted); }
.rsd-mn-page > .rsd-mn-cap:first-child { margin-top: 10px; }

/* Раздел: «← Все разделы», заголовок и список подразделов */
.rsd-mn-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; margin: 8px 0 6px -6px; padding: 6px 10px 6px 4px; border: 0; border-radius: 10px;
  background: none; color: var(--rsd-orange); font-size: 14px; font-weight: 500; }
.rsd-mn-back i { font-size: 20px; }
.rsd-mn-sec { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rsd-mn-sec h4 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.rsd-mn-sec small { font-size: 13px; color: var(--rsd-muted); }
.rsd-mn-list { display: flex; flex-direction: column; border-radius: 16px; border: 1px solid #eceef1; background: var(--rsd-card); overflow: hidden; }
body.dark-only .rsd-mn-list { border-color: var(--rsd-line); }
.rsd-mn-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 12px 8px 14px; border: 0; background: none; text-align: left;
  color: var(--rsd-text); font-size: 15px; -webkit-tap-highlight-color: transparent; }
.rsd-mn-row + .rsd-mn-row { box-shadow: inset 0 1px 0 var(--rsd-line); }
.rsd-mn-row > i:first-child, .rsd-mn-row > svg:first-child { font-size: 19px; color: var(--rsd-orange); flex: none; }
.rsd-mn-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rsd-mn-row small { font-size: 12.5px; color: var(--rsd-muted); }
.rsd-mn-row > i:last-child { font-size: 19px; color: #b3b8bf; flex: none; }
.rsd-mn-row:active { background: rgba(16, 24, 40, .04); }
.rsd-mn-row.on { color: var(--rsd-orange); }
.rsd-mn-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 0 12px; text-align: center; }
.rsd-mn-empty b { font-size: 15px; font-weight: 600; }
.rsd-mn-empty small { font-size: 13px; color: var(--rsd-muted); }
@media (max-width: 360px) {
  .rsd-mn-tl { font-size: 13px; }
  .rsd-mn-quick b { font-size: 11.5px; }
  .rsd-mn-badge { min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; }
  .rsd-mn-card { gap: 8px; padding: 0 6px; }
  .rsd-mn-ic { width: 34px; height: 34px; border-radius: 10px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Стекло и тёмная тема в стиле витрин ReStar («Тёмная 2.0», ui/dark-theme/glass-addon.css «Сытый Гусь»):
   почти чёрный фон #0B0B0D, оранжевый #FB7A09, стеклянные карточки с бликом сверху,
   дымчатое стекло у нижней панели, шапки и нижних окон, мягкие полупрозрачные подложки вместо «грязных» коричневых.
   Нижняя панель — как у витрин: плавающая, скругление 30, «облако» menu-wave.png над круглой кнопкой.
   ════════════════════════════════════════════════════════════════════════════ */
:root {
  --rsd-bar: linear-gradient(180deg, rgba(255, 255, 255, .78) 0%, rgba(250, 250, 252, .88) 100%);
  --rsd-blur: blur(18px) saturate(180%);
  --rsd-sheet: rgba(246, 247, 245, .88);
  --rsd-sheet-top: rgba(255, 255, 255, .6);
  --rsd-head-glass: rgba(255, 255, 255, .74);
  --rsd-glass-line: rgba(17, 24, 39, .08);
  --rsd-field: #ffffff;
  --rsd-wave-h: calc(150px * 106 / 581);
}
body.dark-only {
  --rsd-bg: #0b0b0d; --rsd-card: #18191d; --rsd-line: rgba(255, 255, 255, .09); --rsd-text: #f5f5f6; --rsd-muted: #9b9ca4; --rsd-cell: rgba(255, 255, 255, .06);
  --rsd-orange: #fb7a09; --rsd-orange2: #ff9a3d; --rsd-orange-soft: rgba(251, 122, 9, .16);
  --rsd-green: #22c55e; --rsd-green-soft: rgba(34, 197, 94, .14); --rsd-red: #f05252; --rsd-red-soft: rgba(240, 82, 82, .16);
  --rsd-blue: #6b96ff; --rsd-blue-soft: rgba(107, 150, 255, .16); --rsd-violet: #a78bfa; --rsd-violet-soft: rgba(167, 139, 250, .16); --rsd-shadow: none;
  --rsd-bar: linear-gradient(180deg, rgba(34, 36, 41, .76) 0%, rgba(20, 21, 25, .86) 100%);
  --rsd-blur: blur(18px) saturate(160%);
  --rsd-sheet: linear-gradient(180deg, rgba(30, 31, 36, .9) 0%, rgba(13, 14, 17, .95) 100%);
  --rsd-sheet-top: rgba(255, 255, 255, .025);
  --rsd-head-glass: rgba(12, 13, 16, .62);
  --rsd-glass-line: rgba(255, 255, 255, .09);
  --rsd-field: rgba(255, 255, 255, .06);
  --rsd-gcard: radial-gradient(120% 70% at 0% 100%, rgba(251, 122, 9, .1), transparent 60%), linear-gradient(165deg, rgba(62, 64, 72, .42) 0%, rgba(22, 23, 27, .5) 100%);
  --rsd-gcard-line: rgba(255, 255, 255, .13);
  --rsd-gcard-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .02), 0 12px 28px -14px rgba(0, 0, 0, .7);
}

@media (max-width: 767.98px) {
  /* Фон главной в тёмной теме: чёрный с тёплым отсветом — стеклу есть что размывать */
  body.dark-only.rsd-on .page-body {
    background: radial-gradient(90% 38% at 100% 0%, rgba(251, 122, 9, .13), transparent 65%), radial-gradient(80% 30% at 0% 55%, rgba(251, 122, 9, .06), transparent 70%), #0b0b0d !important;
  }
  /* Шапка — дымчатое стекло, страница проезжает под ней */
  html body .page-wrapper .page-header { background: var(--rsd-head-glass) !important; border-bottom: 1px solid var(--rsd-glass-line) !important;
    -webkit-backdrop-filter: var(--rsd-blur); backdrop-filter: var(--rsd-blur); }
  body.dark-only .page-wrapper .page-header .nav-right .nav-menus .header-search, body.dark-only .page-wrapper .page-header .nav-right .nav-menus .notification-box,
  body.dark-only .page-wrapper .page-header .nav-right .nav-menus .mode { background: rgba(255, 255, 255, .07) !important; }

  /* ── Нижняя панель: стекло с «облаком», как navbar-menu витрин ──
     Стекло — слой ::after под пунктами; он поднят на высоту облака и вырезан маской «облако + панель со скруглением 30».
     Облако 150 × 27 px заходит на панель на 10 px. */
  #rsd-nav { background: none !important; border: 0 !important; border-radius: 30px; box-shadow: 0 5px 24px rgba(0, 0, 0, .14); overflow: visible; isolation: isolate; }
  body.dark-only #rsd-nav { box-shadow: 0 8px 26px rgba(0, 0, 0, .55); }
  #rsd-nav::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; top: calc(10px - var(--rsd-wave-h)); z-index: -1; pointer-events: none;
    background: var(--rsd-bar); -webkit-backdrop-filter: var(--rsd-blur); backdrop-filter: var(--rsd-blur);
    -webkit-mask: url(menu-wave.png) center top / 150px var(--rsd-wave-h) no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='30'/%3E%3C/svg%3E") center bottom / 100% calc(100% + 10px - var(--rsd-wave-h)) no-repeat;
    mask: url(menu-wave.png) center top / 150px var(--rsd-wave-h) no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='30'/%3E%3C/svg%3E") center bottom / 100% calc(100% + 10px - var(--rsd-wave-h)) no-repeat; }
  #rsd-nav a, #rsd-nav button { border-radius: 18px; font-size: 11px; font-weight: 500; color: var(--rsd-muted); }
  #rsd-nav svg { width: 24px; height: 24px; stroke-width: 1.75; }
  #rsd-nav .on, body.dark-only #rsd-nav .on { background: none; color: var(--rsd-orange); font-weight: 500; }
  #rsd-nav a:active, #rsd-nav button:active { background: none; transform: scale(.92); transition: transform .14s ease; }
  #rsd-nav .rsd-nav-menu { position: relative; color: var(--rsd-text); }
  #rsd-nav .rsd-nav-fab { position: absolute; left: 50%; top: -15px; margin: 0; width: 50px; height: 50px; transform: translateX(-50%);
    background: linear-gradient(to bottom, rgba(251, 122, 9, .55) 0%, #fb7a09 100%); box-shadow: 0 6px 14px rgba(251, 122, 9, .32); }
  #rsd-nav .rsd-nav-menu:active .rsd-nav-fab { transform: translateX(-50%) scale(.94); }
  #rsd-nav .rsd-nav-menu { justify-content: flex-end; padding-bottom: 6px; }
}

/* ── Карточки главной, окна статусов и меню в тёмной теме — стекло витрин ── */
body.dark-only .rsd-card, body.dark-only .rsd-kpi:not(.rsd-kpi-main), body.dark-only .rsd-oc, body.dark-only .rsd-mn-list {
  background: var(--rsd-gcard) !important; border-color: var(--rsd-gcard-line) !important; box-shadow: var(--rsd-gcard-shadow) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%); }
body.dark-only .rsd-kpi-main { box-shadow: 0 12px 28px -12px rgba(251, 122, 9, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
body.dark-only .rsd-date { background: rgba(255, 255, 255, .06); border-color: var(--rsd-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
body.dark-only .rsd-cal { border-color: var(--rsd-line); }
body.dark-only .rsd-cell { border-color: transparent; }
body.dark-only .rsd-cell-picked { background: rgba(251, 122, 9, .12); border-color: var(--rsd-orange); }
body.dark-only .rsd-seg .on, body.dark-only .rsd-ot .on { box-shadow: 0 4px 14px rgba(251, 122, 9, .35); }
body.dark-only .rsd-ps-sum > div { background: var(--rsd-orange-soft); }
body.dark-only .rsd-ot b { background: rgba(255, 255, 255, .1); }
body.dark-only .rsd-tag { color: #c4c5cb; }

/* ── Нижние окна: стекло, фон за окном затемняется и размывается ── */
.rsd-sheet { background: var(--rsd-sheet) !important; -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--rsd-glass-line), 0 -10px 30px rgba(0, 0, 0, .12); }
body.dark-only .rsd-sheet { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 -12px 36px rgba(0, 0, 0, .6); }
.rsd-sheet-back { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body.dark-only .rsd-sheet-back { background: rgba(0, 0, 0, .5); }
.rsd-oz-top, .rsd-mn-top { background: var(--rsd-sheet-top) !important; border-bottom-color: var(--rsd-glass-line) !important; }
.rsd-mn-search { background: var(--rsd-field); box-shadow: inset 0 0 0 1px var(--rsd-glass-line); }
body.dark-only .rsd-mn-search:focus-within { background: rgba(255, 255, 255, .08); }
body.dark-only .rsd-sheet-grip, body.dark-only .rsd-oz .rsd-sheet-grip::before { background: rgba(255, 255, 255, .18); }
body.dark-only .rsd-oz .rsd-sheet-grip { background: none; }

/* Кнопка шага в окне статусов: тёмная подложка под градиентной обводкой */
body.dark-only .rsd-oc-do { color: #ffa45c;
  background: linear-gradient(180deg, rgba(251, 122, 9, .14), rgba(251, 122, 9, .05)) padding-box, linear-gradient(#141518, #141518) padding-box,
    linear-gradient(135deg, #fb7a09, #ffbf80) border-box; }

/* Меню показателя и уведомление — тоже стекло */
.rsd-mm { background: var(--rsd-sheet); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border-color: var(--rsd-glass-line); }
body.dark-only .rsd-mm-item.on { background: rgba(251, 122, 9, .14); }
.rsd-toast { background: rgba(28, 29, 33, .86); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 10px 30px rgba(0, 0, 0, .3); }
/* Календарь в тёмной теме: сегодня — оранжевая плашка, пустые клетки до 1-го числа не видны */
body.dark-only .rsd-cell-void { background: none; }
body.dark-only .rsd-cell-today { background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); box-shadow: 0 4px 14px rgba(251, 122, 9, .35); border-color: transparent; }

/* Центральная кнопка без подписи — как бонусный круг на витринах: крупнее, сидит в «облаке» */
@media (max-width: 767.98px) {
  #rsd-nav .rsd-nav-fab { top: -7px; width: 54px; height: 54px; }
  #rsd-nav .rsd-nav-fab svg { width: 24px; height: 24px; }
}
/* Размеры как в шаблоне витрин (navbar.twig при ширине 393): панель 58 px, отступы 10, круг 56 px выступает на 4 px,
   «облако» 150 × 27 заходит на панель на 11 px. */
@media (max-width: 767.98px) {
  #rsd-nav { height: 58px; left: 10px; right: 10px; padding: 5px 6px; }
  #rsd-nav::after { top: calc(11px - var(--rsd-wave-h));
    -webkit-mask: url(menu-wave.png) center top / 150px var(--rsd-wave-h) no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='30'/%3E%3C/svg%3E") center bottom / 100% calc(100% + 11px - var(--rsd-wave-h)) no-repeat;
    mask: url(menu-wave.png) center top / 150px var(--rsd-wave-h) no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='30'/%3E%3C/svg%3E") center bottom / 100% calc(100% + 11px - var(--rsd-wave-h)) no-repeat; }
  #rsd-nav .rsd-nav-fab { top: -9px; width: 56px; height: 56px; box-shadow: 0 6px 16px rgba(251, 122, 9, .3); }
  #rsd-nav .rsd-nav-fab svg { width: 24px; height: 24px; }
}

/* ════ Меню плитками (набросок владельца 12.11.2026) ════
   Белое окно; шапка: значок меню, «Меню», под ним заведение; поиск; «Быстрый доступ» с «Настроить»;
   «Разделы управления» — белые плитки в 4 колонки, значок в сером квадрате, подпись снизу. */
.rsd-mn { --rsd-sheet: rgba(255, 255, 255, .95); }
body.dark-only .rsd-mn { --rsd-sheet: linear-gradient(180deg, rgba(30, 31, 36, .92) 0%, rgba(13, 14, 17, .96) 100%); }
.rsd-mn-top { background: transparent !important; border-bottom: 0 !important; padding-bottom: 6px; }
.rsd-mn-hd { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rsd-mn-logo { flex: none; width: 48px; height: 48px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--rsd-orange-soft); color: var(--rsd-orange); }
.rsd-mn-logo svg { width: 26px; height: 26px; stroke-width: 2; }
.rsd-mn-hd-t { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.rsd-mn .rsd-mn-hd-t h3 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.rsd-mn-co2 { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-left: -4px; padding: 2px 4px; border: 0; border-radius: 8px; background: none;
  color: var(--rsd-text); font-size: 14px; font-weight: 500; }
.rsd-mn-co2 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rsd-mn-co2 svg { flex: none; color: var(--rsd-muted); }
.rsd-mn-co2:active { background: var(--rsd-cell); }
.rsd-mn-search { background: #f3f4f6; box-shadow: none; }
body.dark-only .rsd-mn-search { background: var(--rsd-field); box-shadow: inset 0 0 0 1px var(--rsd-glass-line); }
.rsd-mn-hrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 2px 10px; }
.rsd-mn-hrow .rsd-mn-h { margin: 0; }
.rsd-mn .rsd-mn-h { font-size: 17px; }
.rsd-mn-edit { display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; color: var(--rsd-orange); font-size: 14px; font-weight: 500; }

/* Быстрый доступ: светло-серые плитки, первая — персиковая с оранжевым значком */
.rsd-mn-qs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rsd-mn-q { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 90px; padding: 10px 4px;
  border: 1px solid #eef0f2; border-radius: 18px; background: #f7f8f9; color: #1f2937; box-shadow: 0 6px 14px -10px rgba(16, 24, 40, .22);
  -webkit-tap-highlight-color: transparent; transition: transform .1s; }
.rsd-mn-q b { font-size: 12.5px; font-weight: 500; line-height: 1.2; text-align: center; color: var(--rsd-text); overflow-wrap: anywhere; }
.rsd-mn-q-accent { background: linear-gradient(180deg, #fff5ee, #ffe9da); border-color: #ffd9bd; color: var(--rsd-orange); box-shadow: 0 8px 18px -12px rgba(251, 122, 9, .5); }

/* Разделы управления: белые плитки 4 × 3 */
.rsd-mn-ts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rsd-mn-ts.rsd-mn-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rsd-mn-t { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-width: 0; min-height: 94px; padding: 12px 3px 10px;
  border: 1px solid #f0f1f3; border-radius: 18px; background: #fff; color: var(--rsd-text);
  box-shadow: 0 8px 18px -12px rgba(16, 24, 40, .25), 0 1px 2px rgba(16, 24, 40, .04); -webkit-tap-highlight-color: transparent; transition: transform .1s; }
.rsd-mn-tic { position: relative; flex: none; width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: #f3f4f6; color: #1f2937; }
.rsd-mn-t .rsd-mn-tl { display: block; flex: none; max-width: 100%; font-size: 12px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden;
  -webkit-line-clamp: unset; }
.rsd-mn-ts.rsd-mn-small .rsd-mn-tl { font-size: 11px; }
.rsd-mn-t.on .rsd-mn-tic { background: var(--rsd-orange-soft); color: var(--rsd-orange); }
.rsd-mn-t.on .rsd-mn-tl { color: var(--rsd-orange); }
.rsd-mn-t:active, .rsd-mn-q:active { transform: scale(.96); }

/* Настройка быстрого доступа */
.rsd-mn-qrow .rsd-mn-qmark { flex: none; display: inline-flex; color: #b3b8bf; font-style: normal; }
.rsd-mn-qrow.on .rsd-mn-qmark { color: var(--rsd-orange); }
.rsd-mn-qrow.on { color: var(--rsd-text); background: rgba(251, 122, 9, .06); }
.rsd-mn-warn small { color: var(--rsd-red) !important; }
.rsd-mn-reset { align-self: center; margin-top: 12px; padding: 8px 12px; border: 0; background: none; color: var(--rsd-muted); font-size: 13.5px; }

/* Тёмная тема: плитки — стекло витрин, значки светлые, первая плитка быстрого доступа — тёплое стекло */
body.dark-only .rsd-mn-q, body.dark-only .rsd-mn-t {
  background: var(--rsd-gcard); border-color: var(--rsd-gcard-line); box-shadow: var(--rsd-gcard-shadow); color: #e5e7eb;
  -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%); }
body.dark-only .rsd-mn-tic { background: rgba(255, 255, 255, .07); color: #e5e7eb; }
body.dark-only .rsd-mn-q-accent { background: radial-gradient(120% 80% at 50% 0%, rgba(251, 122, 9, .3), transparent 70%), linear-gradient(165deg, rgba(62, 64, 72, .42), rgba(22, 23, 27, .5));
  border-color: rgba(251, 122, 9, .4); color: var(--rsd-orange); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 14px rgba(251, 122, 9, .18); }
body.dark-only .rsd-mn-t.on .rsd-mn-tic { background: var(--rsd-orange-soft); color: var(--rsd-orange); }
body.dark-only .rsd-mn-t.on { border-color: rgba(251, 122, 9, .45); }
@media (max-width: 360px) {
  .rsd-mn-q b { font-size: 11.5px; }
  .rsd-mn-tic { width: 42px; height: 42px; }
}
/* Значки разделов и счётчик (нужны странице раздела, настройке и плиткам) */
.rsd-mn-ic { position: relative; width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px;
  background: var(--rsd-orange-soft); color: var(--rsd-orange); font-size: 20px; }
.rsd-mn-ic-l { width: 46px; height: 46px; border-radius: 14px; }
.rsd-mn-badge { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; box-sizing: border-box;
  background: var(--rsd-red); color: #fff; font: 600 10.5px/18px var(--restar-font, Inter, sans-serif); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--rsd-card); }
.rsd-mn-hd, .rsd-mn-hd-t { flex: 1; }
/* Длинное одно слово («Бронирования») — мельче шрифт только у этой плитки; названия из нескольких слов переносятся */
.rsd-mn-t .rsd-mn-tl { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; overflow-wrap: normal; }
.rsd-mn-t.rsd-mn-t-s .rsd-mn-tl { font-size: 10.5px; letter-spacing: -0.02em; }
/* Окно меню по высоте содержимого (не выше экрана минус 44 px): нижний ряд не упирается в край, прокрутка — только если не хватает места */
.rsd-mn.rsd-sheet { height: auto !important; max-height: calc(100vh - 44px); max-height: calc(100dvh - 44px); }
.rsd-mn-body { flex: 0 1 auto; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.rsd-mn-logo { width: 44px; height: 44px; border-radius: 14px; }
.rsd-mn-logo svg { width: 24px; height: 24px; }
.rsd-mn-hrow { margin: 14px 2px 9px; }
.rsd-mn .rsd-mn-h { margin-top: 14px; margin-bottom: 9px; }
.rsd-mn-q { min-height: 84px; gap: 7px; }
.rsd-mn-t { min-height: 88px; gap: 8px; padding: 10px 3px 9px; }
.rsd-mn-tic { width: 44px; height: 44px; }

/* Страница раздела: «назад» и заголовок одной строкой, подразделы — белые карточки в две колонки со значками */
.rsd-mn-sechd { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
.rsd-mn-sechd h4 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.rsd-mn-sechd small { font-size: 12.5px; color: var(--rsd-muted); }
.rsd-mn-backc { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--rsd-cell); color: var(--rsd-text); font-size: 22px;
  display: inline-flex; align-items: center; justify-content: center; margin-right: 2px; }
.rsd-mn-sg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rsd-mn-sc { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 58px; padding: 8px 6px 8px 8px; border: 1px solid #f0f1f3; border-radius: 16px;
  background: #fff; color: var(--rsd-text); text-align: left; box-shadow: 0 8px 18px -12px rgba(16, 24, 40, .25), 0 1px 2px rgba(16, 24, 40, .04);
  -webkit-tap-highlight-color: transparent; transition: transform .1s; }
.rsd-mn-sc:active { transform: scale(.97); }
.rsd-mn-sci { flex: none; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #f3f4f6; color: #1f2937; font-size: 19px; }
.rsd-mn-sct { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rsd-mn-sc > i:last-child { flex: none; font-size: 17px; color: #b3b8bf; }
.rsd-mn-sc.on .rsd-mn-sci { background: var(--rsd-orange-soft); color: var(--rsd-orange); }
.rsd-mn-sc.on .rsd-mn-sct { color: var(--rsd-orange); }
body.dark-only .rsd-mn-sc { background: var(--rsd-gcard); border-color: var(--rsd-gcard-line); box-shadow: var(--rsd-gcard-shadow);
  -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%); }
body.dark-only .rsd-mn-sci { background: rgba(255, 255, 255, .07); color: #e5e7eb; }
.rsd-mn-sc { padding-right: 10px; }
.rsd-mn-sct { overflow-wrap: anywhere; }
/* Подразделы легче главного меню (второй уровень иерархии): ниже карточки, меньше значок, обычный вес шрифта, почти без тени */
.rsd-mn-sechd { margin: 6px 0 12px; }
.rsd-mn-sechd h4 { font-size: 16.5px; }
.rsd-mn-sechd .rsd-mn-ic { width: 34px; height: 34px; border-radius: 10px; }
.rsd-mn-sg { gap: 6px; }
.rsd-mn-sc { min-height: 50px; gap: 8px; padding: 6px 10px 6px 7px; border-radius: 14px; border-color: #f1f2f4; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.rsd-mn-sci { width: 32px; height: 32px; border-radius: 10px; font-size: 16.5px; background: #f5f6f7; color: #4b5563; }
.rsd-mn-sct { font-size: 13px; font-weight: 400; color: #1f2937; }
body.dark-only .rsd-mn-sct { color: #e5e7eb; }
body.dark-only .rsd-mn-sci { color: #c4c7ce; }
.rsd-mn .rsd-mn-cap { margin: 12px 2px 7px; font-size: 12px; }

/* Старое боковое меню на телефоне не показывается никогда: навигация — нижняя панель и окно «Меню».
   В разметке оно остаётся: из него берутся пункты меню и список заведений. */
@media (max-width: 767.98px) {
  html body .page-wrapper .sidebar-wrapper { visibility: hidden !important; pointer-events: none !important; transform: translateX(-110%) !important; }
  html body .page-wrapper .sidebar-wrapper ~ .bg-overlay, html body .bg-overlay.active { display: none !important; }
}
.rsd-mn-row.on .rsd-mn-qmark { color: var(--rsd-orange); }

/* ---------- «Требует внимания» с инфографикой (макет владельца 12.11.2026) ---------- */
.rsd-attn2 { padding: 14px 14px 4px; }
.rsd-at-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; }
.rsd-at-warn { flex: none; color: var(--rsd-orange); display: inline-flex; }
.rsd-at-head h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.rsd-at-all { flex: none; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0; color: var(--rsd-orange); font-size: 14px; font-weight: 500; }
.rsd-at-all i { font-size: 17px; }
.rsd-at-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--rsd-line); background: none; text-align: left;
  color: var(--rsd-text); -webkit-tap-highlight-color: transparent; }
.rsd-at-row:active { opacity: .75; }
.rsd-at-media { position: relative; flex: none; width: 64px; height: 64px; }
.rsd-at-media img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; display: block; background: var(--rsd-cell); }
.rsd-at-ic { width: 64px; height: 64px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; }
.rsd-at-ic svg { width: 30px; height: 30px; }
.rsd-at-badge { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--rsd-card); box-shadow: 0 2px 8px rgba(16, 24, 40, .18); }
.rsd-at-badge svg { width: 18px; height: 18px; }
.rsd-at-badge-red { color: var(--rsd-red); }
.rsd-at-badge-orange { color: var(--rsd-orange); }
.rsd-at-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; box-sizing: border-box; background: var(--rsd-red); color: #fff;
  font: 600 12px/22px var(--restar-font, Inter, sans-serif); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--rsd-card); }
.rsd-at-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rsd-at-body b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.rsd-at-body small { font-size: 13px; color: var(--rsd-muted); line-height: 1.3; }
.rsd-at-row > i { flex: none; font-size: 22px; color: #b3b8bf; }
.rsd-at-bar { display: block; height: 8px; margin-top: 7px; border-radius: 4px; background: #e8eaed; overflow: hidden; }
.rsd-at-bar > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--rsd-orange), var(--rsd-orange2)); }
.rsd-at-bar-red > span { background: linear-gradient(90deg, #e5383b, #f87171); }
.rsd-at-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rsd-at-chip { display: inline-flex; align-items: center; height: 26px; max-width: 100%; padding: 0 10px; border-radius: 9px; font-size: 12.5px; color: var(--rsd-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsd-at-chip-red { background: var(--rsd-red-soft); }
.rsd-at-chip-orange { background: var(--rsd-orange-soft); }
.rsd-at-chip-more { background: var(--rsd-cell); color: var(--rsd-muted); }
.rsd-at-segs { display: flex; gap: 5px; margin-top: 8px; }
.rsd-at-segs > span { flex: 1; height: 8px; border-radius: 4px; }
.rsd-at-seg-r { background: #ef4444; }
.rsd-at-seg-o { background: #fb923c; }
.rsd-at-seg-g { background: #e5e7eb; }
body.dark-only .rsd-at-bar, body.dark-only .rsd-at-seg-g { background: rgba(255, 255, 255, .1); }
body.dark-only .rsd-at-badge { background: #1d1e22; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
body.dark-only .rsd-at-count { box-shadow: 0 0 0 2px #1d1e22; }
@media (max-width: 380px) {
  .rsd-at-media, .rsd-at-media img, .rsd-at-ic { width: 56px; height: 56px; }
  .rsd-at-row { gap: 12px; }
}
.rsd-attn2 .rsd-at-all { color: var(--rsd-orange) !important; }
.rsd-at-chips { flex-wrap: nowrap; overflow: hidden; }
.rsd-at-chip { flex: 0 1 auto; min-width: 0; }
.rsd-at-chip-more { flex: none; }
.rsd-at-head h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rsd-at-chip { display: inline-block; line-height: 26px; }
.rsd-at-more { font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--rsd-muted); background: var(--rsd-cell); border-radius: 7px; padding: 1px 6px; vertical-align: 1px; }
@media (max-width: 380px) { .rsd-at-head h2 { font-size: 16px; } .rsd-at-all { font-size: 13.5px; } .rsd-at-body b { font-size: 14.5px; } }
.rsd-at-all-s { display: none; }
@media (max-width: 380px) { .rsd-at-all-l { display: none; } .rsd-at-all-s { display: inline; } }

/* «Требует внимания»: шапка с оранжевой чертой и счётчиком, тёплый отсвет справа сверху, сводка из четырёх показателей */
.rsd-attn2 { position: relative; overflow: hidden; padding: 16px 14px 6px;
  background: radial-gradient(70% 55% at 100% 0%, rgba(255, 138, 61, .16), transparent 70%), var(--rsd-card); }
body.dark-only .rsd-attn2 { background: radial-gradient(70% 55% at 100% 0%, rgba(251, 122, 9, .18), transparent 70%), var(--rsd-gcard) !important; }
.rsd-attn2 .rsd-at-head { gap: 10px; padding-bottom: 12px; }
.rsd-at-mark { flex: none; width: 4px; height: 24px; border-radius: 2px; background: linear-gradient(180deg, #ff9a42, #ff7a1a); }
.rsd-attn2 .rsd-at-head h2 { flex: 0 1 auto; font-size: 19px; }
.rsd-at-total { flex: none; min-width: 30px; height: 26px; padding: 0 9px; border-radius: 13px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  background: var(--rsd-orange-soft); color: #d4570a; font-size: 14px; font-weight: 600; }
body.dark-only .rsd-at-total { color: #ffa45c; }
.rsd-at-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 6px; padding: 10px 0; border-radius: 16px;
  background: linear-gradient(180deg, #fff6ef, #fdf1e8); }
body.dark-only .rsd-at-stats { background: rgba(251, 122, 9, .08); box-shadow: inset 0 0 0 1px rgba(251, 122, 9, .14); }
.rsd-at-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 2px 4px; border: 0; background: none; color: var(--rsd-text);
  -webkit-tap-highlight-color: transparent; }
.rsd-at-stat + .rsd-at-stat { box-shadow: inset 1px 0 0 rgba(17, 24, 39, .08); }
body.dark-only .rsd-at-stat + .rsd-at-stat { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .08); }
.rsd-at-stat:active { opacity: .7; }
.rsd-at-sn { display: inline-flex; align-items: center; gap: 6px; }
.rsd-at-sn b { font-size: 20px; font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.rsd-at-stat small { max-width: 100%; font-size: 11.5px; color: var(--rsd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsd-at-si { display: inline-flex; }
.rsd-at-si-red { color: var(--rsd-red); }
.rsd-at-si-orange { color: var(--rsd-orange); }
.rsd-at-si-blue { color: var(--rsd-blue); }
.rsd-at-zero .rsd-at-si, .rsd-at-zero b { color: var(--rsd-muted); opacity: .6; }
.rsd-attn2 .rsd-at-all { display: flex; justify-content: center; width: 100%; padding: 11px 0 9px; border-top: 1px solid var(--rsd-line); }
@media (max-width: 380px) {
  .rsd-attn2 .rsd-at-head h2 { font-size: 17px; }
  .rsd-at-sn b { font-size: 18px; }
  .rsd-at-sn { gap: 4px; }
  .rsd-at-si svg { width: 18px; height: 18px; }
  .rsd-at-stat small { font-size: 10.5px; }
}
/* Лента плашек листается в стороны: до края карточки, без полосы прокрутки, справа затухание */
.rsd-at-row { cursor: pointer; }
.rsd-at-chips { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y;
  margin-right: -14px; padding-right: 28px; scroll-padding-left: 0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.rsd-at-chips::-webkit-scrollbar { display: none; }
.rsd-at-chip { flex: none; max-width: none; overflow: visible; text-overflow: clip; }

/* ════ Стоп-лист (мобильная страница по дизайн-коду) ════ */
@media (max-width: 767.98px) {
  body.rsl-on app-stop-list-page, body.rsl-on .page-body-main > app-page-crumbs { display: none !important; }
  body.rsl-on .page-body { background: var(--rsd-bg); }
  body.dark-only.rsl-on .page-body { background: radial-gradient(90% 38% at 100% 0%, rgba(251, 122, 9, .13), transparent 65%), #0b0b0d !important; }
  body.rsl-on .page-body-main { padding: 0 12px !important; }
}
.rsl-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.rsl-head p { margin: 2px 0 0; font-size: 14px; color: var(--rsd-muted); }
.rsl-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px 0; }
.rsl-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 0 4px; }
.rsl-stat + .rsl-stat { box-shadow: inset 1px 0 0 var(--rsd-line); }
.rsl-sn { display: inline-flex; align-items: center; gap: 6px; }
.rsl-sn b { font-size: 20px; font-weight: 600; line-height: 1; }
.rsl-stat small { max-width: 100%; font-size: 11px; color: var(--rsd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsl-si { display: inline-flex; }
.rsl-si-red { color: var(--rsd-red); }
.rsl-si-orange { color: var(--rsd-orange); }
.rsl-si-green { color: var(--rsd-green); }
.rsl-si-muted { color: var(--rsd-muted); }
.rsl-zero .rsl-si, .rsl-zero b { opacity: .45; }
.rsl-add { display: flex; align-items: center; justify-content: center; gap: 8px; }
.rsl-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
.rsl-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rsl-tabs em { font-style: normal; font-size: 12px; font-weight: 600; min-width: 20px; height: 20px; line-height: 20px; border-radius: 10px; padding: 0 6px; background: rgba(17, 24, 39, .08); }
.rsl-tabs .on em { background: rgba(255, 255, 255, .28); }
.rsl-list { display: flex; flex-direction: column; gap: 10px; }
.rsl-item { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.rsl-top { display: flex; align-items: flex-start; gap: 12px; }
.rsl-media { flex: none; width: 60px; height: 60px; border-radius: 16px; overflow: hidden; background: var(--rsd-cell); display: inline-flex; }
.rsl-media img { width: 100%; height: 100%; object-fit: cover; }
.rsl-media-ic { width: 100%; height: 100%; display: inline-flex; align-items: center; justify-content: center; color: var(--rsd-orange); background: var(--rsd-orange-soft); }
.rsl-media-s { width: 40px; height: 40px; border-radius: 12px; }
.rsl-media-s .rsl-media-ic svg { width: 18px; height: 18px; }
.rsl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rsl-body b { font-size: 15.5px; font-weight: 600; line-height: 1.25; }
.rsl-body small { font-size: 13px; color: var(--rsd-muted); line-height: 1.3; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rsl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rsl-tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.rsl-tag-hidden { background: var(--rsd-cell); color: #4b5563; }
.rsl-tag-off { background: #fff4e0; color: #b45309; }
.rsl-tag-cat { background: var(--rsd-blue-soft); color: var(--rsd-blue); }
body.dark-only .rsl-tag-hidden { color: #c4c7ce; }
body.dark-only .rsl-tag-off { background: rgba(245, 158, 11, .16); color: #fbbf24; }
.rsl-retbox { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--rsd-cell); }
.rsl-ret { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--rsd-text); }
.rsl-ret svg { color: var(--rsd-green); flex: none; }
.rsl-ret em { margin-left: auto; font-style: normal; color: var(--rsd-muted); font-size: 12.5px; white-space: nowrap; }
.rsl-ret-manual, .rsl-ret-manual svg { color: var(--rsd-muted); }
.rsl-bar { display: block; height: 6px; border-radius: 3px; background: rgba(17, 24, 39, .08); overflow: hidden; }
body.dark-only .rsl-bar { background: rgba(255, 255, 255, .1); }
.rsl-bar > span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #22c55e, #4ade80); }
.rsl-act { display: flex; gap: 8px; }
.rsl-act .rsl-back { flex: 1; height: 38px; font-size: 14px; }
.rsl-more { flex: none; width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--rsd-cell); color: var(--rsd-text); display: inline-flex; align-items: center; justify-content: center; }
.rsl-switch { flex: none; position: relative; width: 46px; height: 28px; border: 0; border-radius: 14px; background: #d1d5db; padding: 0; transition: background-color .2s; }
.rsl-switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.rsl-switch.on { background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); }
.rsl-switch.on span { transform: translateX(18px); }
body.dark-only .rsl-switch:not(.on) { background: rgba(255, 255, 255, .18); }
.rsl-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.rsl-days span { height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--rsd-cell); color: var(--rsd-muted); }
.rsl-days span.on { background: var(--rsd-orange-soft); color: #d4570a; font-weight: 500; }
body.dark-only .rsl-days span.on { color: #ffa45c; }
.rsl-paused { opacity: .6; }
.rsl-hist { padding: 4px 12px; gap: 0; }
.rsl-hrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.rsl-hrow + .rsl-hrow { border-top: 1px solid var(--rsd-line); }
.rsl-hrow .rsl-body b { font-size: 14px; font-weight: 500; }
.rsl-hrow .rsl-body small { font-size: 12.5px; }
.rsl-hrow > em { flex: none; font-style: normal; font-size: 12px; color: var(--rsd-muted); }
.rsl-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 0 22px; text-align: center; }
.rsl-empty-ic { width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; background: var(--rsd-green-soft); color: var(--rsd-green); margin-bottom: 4px; }
.rsl-empty b { font-size: 15px; font-weight: 600; }
.rsl-empty small { font-size: 13px; color: var(--rsd-muted); }
.rsl-empty-s { padding: 18px 0; }

/* Окно «Снять с продажи» и «Изменить» */
.rsl-sheet { max-height: calc(100dvh - 44px); font-family: var(--restar-font, Inter, system-ui, sans-serif); color: var(--rsd-text); }
.rsl-sheet small { padding: 0 !important; }
.rsl-sheet .rsd-sheet-head h3 { font-size: 20px; font-weight: 600; margin: 0; }
.rsl-sheet .rsd-sheet-head small { font-size: 13px; color: var(--rsd-muted); }
.rsl-type { display: grid; grid-template-columns: 1fr 1fr; }
.rsl-type .rsl-chip { border: 0; background: none; height: auto; padding: 8px; border-radius: 10px; }
.rsl-type .rsl-chip.on { color: #fff; background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); }
.rsl-search { background: var(--rsd-field); box-shadow: inset 0 0 0 1px var(--rsd-glass-line); }
.rsl-pick { display: flex; flex-direction: column; max-height: 34vh; overflow-y: auto; overscroll-behavior: contain; border-radius: 14px; background: var(--rsd-card);
  box-shadow: inset 0 0 0 1px var(--rsd-line); }
.rsl-prow { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px 6px 8px; border: 0; background: none; text-align: left; color: var(--rsd-text); }
.rsl-prow + .rsl-prow { box-shadow: inset 0 1px 0 var(--rsd-line); }
.rsl-prow > span:not(.rsl-media) { flex: 1; min-width: 0; font-size: 14px; display: flex; flex-direction: column; }
.rsl-prow small { font-size: 12px; color: var(--rsd-muted); }
.rsl-check { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #d1d5db; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.rsl-prow.on { background: rgba(251, 122, 9, .06); }
.rsl-prow.on .rsl-check { background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); box-shadow: none; }
.rsl-h { margin: 4px 2px -2px; font-size: 14px; font-weight: 600; }
.rsl-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rsl-modeopt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border: 1px solid var(--rsd-line); border-radius: 14px; background: var(--rsd-card); text-align: left; color: var(--rsd-text); }
.rsl-modeopt b { font-size: 14px; font-weight: 600; }
.rsl-modeopt small { font-size: 12px; color: var(--rsd-muted); line-height: 1.3; }
.rsl-mi { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--rsd-cell); color: var(--rsd-muted); margin-bottom: 2px; }
.rsl-modeopt.on { border-color: rgba(251, 122, 9, .6); box-shadow: 0 0 0 1px rgba(251, 122, 9, .6) inset; background: rgba(251, 122, 9, .05); }
.rsl-modeopt.on .rsl-mi { background: var(--rsd-orange-soft); color: var(--rsd-orange); }
.rsl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rsl-chip { height: 34px; padding: 0 12px; border: 1px solid var(--rsd-line); border-radius: 11px; background: var(--rsd-card); color: var(--rsd-text); font-size: 13.5px; }
.rsl-chip.on { border-color: transparent; background: var(--rsd-orange-soft); color: #d4570a; font-weight: 500; }
body.dark-only .rsl-chip.on { color: #ffa45c; }
.rsl-input { height: 44px; padding: 0 12px; border: 1px solid var(--rsd-line); border-radius: 12px; background: var(--rsd-field); color: var(--rsd-text); font-size: 16px; outline: 0; }
.rsl-input:focus { border-color: rgba(251, 122, 9, .5); }
.rsl-foot { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); display: flex; gap: 8px; margin: 4px -16px calc(-16px - env(safe-area-inset-bottom));
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--rsd-sheet); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 var(--rsd-glass-line); }
.rsl-foot .rsd-btn { flex: 1; margin: 0; }
.rsl-foot .rsd-btn:disabled { opacity: .5; }
.rsl-ghost { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 1px solid var(--rsd-line); border-radius: 14px; background: var(--rsd-card);
  color: var(--rsd-text); font-size: 14px; font-weight: 500; }
@media (max-width: 380px) {
  .rsl-sn b { font-size: 18px; }
  .rsl-stat small { font-size: 10.5px; }
  .rsl-head h1 { font-size: 26px; }
}
body.dark-only .rsl-type .rsl-chip.on { color: #fff; }
.rsl-time { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--rsd-muted); }
.rsl-time svg { flex: none; }

/* «Требует внимания»: живой угол — переливающееся свечение, расходящиеся кольца-сигнал и вращающаяся геометрия.
   Центр — правый верхний угол карточки; содержимое лежит поверх. При «уменьшить движение» — статично. */
.rsd-attn2 > *:not(.rsd-at-fx) { position: relative; z-index: 1; }
.rsd-at-fx { position: absolute; top: 0; right: 0; width: 0; height: 0; z-index: 0; pointer-events: none; }
.rsd-at-fx i { position: absolute; left: 0; top: 0; display: block; border-radius: 50%; }
.rsd-fx-glow { width: 230px; height: 230px; margin: -115px 0 0 -115px; filter: blur(22px); opacity: .9;
  background: conic-gradient(from 0deg, rgba(255, 122, 26, .05), rgba(255, 138, 61, .42), rgba(255, 86, 64, .3), rgba(255, 196, 120, .38), rgba(255, 122, 26, .05));
  animation: rsd-fx-glow 10s linear infinite; }
@keyframes rsd-fx-glow { 0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.14); } 100% { transform: rotate(360deg) scale(1); } }
.rsd-fx-ring { width: 150px; height: 150px; margin: -75px 0 0 -75px; border: 1.5px solid rgba(255, 122, 26, .45); opacity: 0;
  animation: rsd-fx-ring 3.2s cubic-bezier(.2, .6, .3, 1) infinite; }
.rsd-fx-ring2 { animation-delay: 1.6s; }
@keyframes rsd-fx-ring { 0% { transform: scale(.25); opacity: .75; } 80% { opacity: 0; } 100% { transform: scale(1.35); opacity: 0; } }
.rsd-fx-square { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 18px; border: 1.5px solid rgba(255, 138, 61, .5);
  background: linear-gradient(135deg, rgba(255, 154, 66, .18), rgba(255, 122, 26, 0) 60%); animation: rsd-fx-spin 14s linear infinite; }
.rsd-fx-dash { width: 108px; height: 108px; margin: -54px 0 0 -54px; border: 1.5px dashed rgba(255, 122, 26, .3); animation: rsd-fx-spin 22s linear infinite reverse; }
@keyframes rsd-fx-spin { to { transform: rotate(360deg); } }
/* Счётчик пунктов слегка «дышит» в такт кольцам */
.rsd-at-total { animation: rsd-fx-pulse 3.2s ease-in-out infinite; }
@keyframes rsd-fx-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, .35); } 50% { box-shadow: 0 0 0 6px rgba(255, 122, 26, 0); } }
body.dark-only .rsd-fx-glow { opacity: .75; }
body.dark-only .rsd-fx-ring { border-color: rgba(255, 138, 61, .5); }
@media (prefers-reduced-motion: reduce) {
  .rsd-at-fx i, .rsd-at-total { animation: none !important; }
  .rsd-fx-ring { opacity: .25; transform: scale(.7); }
}

/* ════ Остатки склада (мобильная страница по дизайн-коду) ════ */
@media (max-width: 767.98px) {
  body.rbl-on .page-body-main > .rbl-host, body.rbl-on .page-body-main > app-page-crumbs { display: none !important; }
  body.rbl-on .page-body { background: var(--rsd-bg); }
  body.dark-only.rbl-on .page-body { background: radial-gradient(90% 38% at 100% 0%, rgba(251, 122, 9, .13), transparent 65%), #0b0b0d !important; }
  body.rbl-on .page-body-main { padding: 0 12px !important; }
}
.rbl-stat { border: 0; background: none; color: var(--rsd-text); border-radius: 12px; padding: 4px 4px 2px; -webkit-tap-highlight-color: transparent; }
.rbl-stat.on { background: var(--rsd-orange-soft); box-shadow: none !important; }
.rbl-stat.on + .rbl-stat { box-shadow: none; }
.rbl-sum { padding: 6px; gap: 0; }
.rbl-si-red { color: var(--rsd-red); }
.rbl-si-orange { color: var(--rsd-orange); }
.rbl-si-gray { color: var(--rsd-muted); }
.rbl-search { margin-top: -2px; }
.rbl-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -2px -12px 0; padding: 0 12px 2px; }
.rbl-chips::-webkit-scrollbar { display: none; }
.rbl-chips .rsl-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.rbl-chips em { font-style: normal; font-size: 12px; color: var(--rsd-muted); }
.rbl-chips .on em { color: inherit; opacity: .8; }
.rbl-sep { flex: none; width: 1px; margin: 6px 2px; background: var(--rsd-line); }
.rbl-group { padding: 6px 12px 4px; }
.rbl-group h3 { display: flex; align-items: center; gap: 8px; margin: 6px 2px 4px; font-size: 13px; font-weight: 600; color: var(--rsd-muted); letter-spacing: .01em; }
.rbl-group h3 em { font-style: normal; font-weight: 500; font-size: 12px; padding: 1px 7px; border-radius: 8px; background: var(--rsd-cell); }
.rbl-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rbl-row + .rbl-row { border-top: 1px solid var(--rsd-line); }
.rbl-row:active { opacity: .7; }
.rbl-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 4px var(--rsd-cell); }
.rbl-dot-red { background: var(--rsd-red); box-shadow: 0 0 0 4px var(--rsd-red-soft); }
.rbl-dot-orange { background: var(--rsd-orange); box-shadow: 0 0 0 4px var(--rsd-orange-soft); }
.rbl-dot-gray { background: #b3b8bf; }
.rbl-dot-green { background: var(--rsd-green); box-shadow: 0 0 0 4px var(--rsd-green-soft); }
.rbl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rbl-main b { font-size: 14.5px; font-weight: 500; line-height: 1.25; }
.rbl-main small { font-size: 12px; color: var(--rsd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbl-qty { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rbl-qty b { font-size: 15px; font-weight: 600; white-space: nowrap; }
.rbl-qty em { font-style: normal; font-size: 11.5px; font-weight: 500; padding: 1px 7px; border-radius: 7px; }
.rbl-qty-red b { color: var(--rsd-red); }
.rbl-qty-red em { background: var(--rsd-red-soft); color: var(--rsd-red); }
.rbl-qty-orange em { background: var(--rsd-orange-soft); color: #d4570a; }
.rbl-qty-gray b { color: var(--rsd-muted); }
.rbl-qty-gray em { background: var(--rsd-cell); color: var(--rsd-muted); }
.rbl-qty-green em { background: var(--rsd-green-soft); color: var(--rsd-green); }
body.dark-only .rbl-qty-orange em { color: #ffa45c; }
.rbl-bar { position: relative; display: block; height: 5px; margin-top: 3px; border-radius: 3px; background: rgba(17, 24, 39, .08); }
body.dark-only .rbl-bar { background: rgba(255, 255, 255, .1); }
.rbl-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--rsd-green); }
.rbl-bar-orange > span { background: linear-gradient(90deg, var(--rsd-orange), var(--rsd-orange2)); }
.rbl-bar-red > span { background: var(--rsd-red); }
.rbl-bar-gray > span { background: #b3b8bf; }
.rbl-bar-l { height: 10px; border-radius: 5px; margin: 0; }
.rbl-bar-l > span { border-radius: 5px; }
.rbl-bar-l > i { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--rsd-text); opacity: .55; }
.rbl-more { align-self: center; padding: 10px 16px; }
/* Окно позиции */
.rbl-sheet .rsd-sheet-head h3 { font-size: 21px; }
.rbl-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 14px; border-radius: 16px; background: var(--rsd-cell); }
.rbl-hero small { font-size: 12.5px; color: var(--rsd-muted); }
.rbl-hero b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.rbl-hero em { font-style: normal; font-size: 13px; color: var(--rsd-muted); }
.rbl-hero-red { background: var(--rsd-red-soft); }
.rbl-hero-red b { color: var(--rsd-red); }
.rbl-hero-orange { background: var(--rsd-orange-soft); }
.rbl-pill { flex: none; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 10px; background: var(--rsd-card); }
.rbl-pill-red { color: var(--rsd-red); }
.rbl-pill-orange { color: #d4570a; }
.rbl-pill-gray { color: var(--rsd-muted); }
.rbl-pill-green { color: var(--rsd-green); }
.rbl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rbl-grid > div { padding: 10px 12px; border-radius: 12px; background: var(--rsd-card); box-shadow: inset 0 0 0 1px var(--rsd-line); display: flex; flex-direction: column; gap: 2px; }
.rbl-grid small { font-size: 12px; color: var(--rsd-muted); }
.rbl-grid b { font-size: 15px; font-weight: 600; }
.rbl-moves { display: flex; flex-direction: column; border-radius: 14px; background: var(--rsd-card); box-shadow: inset 0 0 0 1px var(--rsd-line); padding: 2px 12px; }
.rbl-mv { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.rbl-mv + .rbl-mv { border-top: 1px solid var(--rsd-line); }
.rbl-mv > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rbl-mv b { font-size: 13.5px; font-weight: 500; }
.rbl-mv small { font-size: 12px; color: var(--rsd-muted); }
.rbl-mv em { flex: none; font-style: normal; font-size: 13.5px; font-weight: 600; color: var(--rsd-text); }
.rbl-mv em.plus { color: var(--rsd-green); }
.rbl-mvi { flex: none; width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--rsd-cell); color: var(--rsd-muted); }
.rbl-mvi-green { background: var(--rsd-green-soft); color: var(--rsd-green); }
.rbl-mvi-red { background: var(--rsd-red-soft); color: var(--rsd-red); }
.rbl-mvi-blue { background: var(--rsd-blue-soft); color: var(--rsd-blue); }
.rbl-mvi-orange { background: var(--rsd-orange-soft); color: var(--rsd-orange); }
.rbl-acts { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-top: 2px; }
.rbl-acts .rsd-btn, .rbl-acts .rsl-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; height: 46px; padding: 0 8px; font-size: 14px; }

/* Остатки: лента групп, закреплена под шапкой (как категории на витрине, вместо фото — значки) */
.rbl-cats { position: sticky; top: var(--rbl-top, 56px); z-index: 6; margin: 0; padding: 8px 0 9px; border-radius: 20px;
  background: var(--rsd-bar); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--rsd-glass-line), 0 8px 18px -14px rgba(16, 24, 40, .25);
  transition: margin .18s ease-out, border-radius .18s ease-out, box-shadow .18s ease-out; }
.rbl-cats.stuck { margin: 0 -12px; border-radius: 0 0 22px 22px; box-shadow: 0 1px 0 var(--rsd-glass-line), 0 12px 24px -16px rgba(16, 24, 40, .35); }
.rbl-cats-in { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 10px; scroll-padding: 0 10px; }
.rbl-cats.stuck .rbl-cats-in { padding: 0 12px; }
.rbl-cats-in::-webkit-scrollbar { display: none; }
.rbl-cat { position: relative; flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px 9px; border: 0; border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fff8f2 100%); box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .07); color: var(--rsd-muted);
  font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s ease-out, background .18s ease-out, box-shadow .18s ease-out; }
.rbl-cat:active { transform: scale(.96); }
.rbl-cat-ic { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--rsd-cell); color: var(--rsd-text); transition: background .18s, color .18s; }
.rbl-cat-ic svg { width: 22px; height: 22px; }
.rbl-cat-t { font-size: 11px; font-weight: 500; line-height: 1.2; text-align: center; min-height: 26px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rbl-cat.on { background: linear-gradient(180deg, #fff4ea 0%, #ffe8d4 100%); box-shadow: inset 0 0 0 1.5px #f3c9a1; color: var(--rsd-text); }
.rbl-cat.on .rbl-cat-ic { background: linear-gradient(135deg, rgba(255, 154, 66, .28), rgba(255, 122, 26, .18)); color: var(--rsd-orange); }
.rbl-cat.on::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: linear-gradient(90deg, var(--rsd-orange), var(--rsd-orange2)); }
.rbl-cat-dot { position: absolute; top: 7px; right: 9px; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.rbl-cat-dot-red { background: var(--rsd-red); }
.rbl-cat-dot-orange { background: var(--rsd-orange); }
.rbl-group { scroll-margin-top: 170px; }
body.dark-only .rbl-cat { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
body.dark-only .rbl-cat.on { background: linear-gradient(180deg, rgba(251, 122, 9, .2), rgba(251, 122, 9, .1)); box-shadow: inset 0 0 0 1.5px rgba(255, 154, 66, .5); }
body.dark-only .rbl-cat.on .rbl-cat-ic { background: rgba(251, 122, 9, .22); color: #ffa45c; }
body.dark-only .rbl-cat-dot { box-shadow: 0 0 0 2px #1b1c20; }
body.dark-only .rbl-cats.stuck { box-shadow: 0 1px 0 var(--rsd-glass-line), 0 14px 26px -16px rgba(0, 0, 0, .7); }
@media (prefers-reduced-motion: reduce) { .rbl-cats, .rbl-cat { transition: none; } }

/* ════ Главная: блоки под основными экранами (mobile-home-more.js) ════ */
.rsd-more { display: flex; flex-direction: column; gap: 12px; }
.rsd-at-ri { font-size: 26px; line-height: 1; }
.rsd-mx { padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.rsd-mx-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rsd-mx-head > .rsd-mx-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rsd-mx-head h2 { margin: 0; font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsd-mx-head small { font-size: 12px; color: var(--rsd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsd-mx-head .rsd-sq i { font-size: 19px; }
.rsd-sq-ai { background: linear-gradient(135deg, #fff1e6, #f3ebff); color: var(--rsd-orange); }
body.dark-only .rsd-sq-ai { background: linear-gradient(135deg, rgba(251, 122, 9, .2), rgba(167, 139, 250, .2)); }
.rsd-mx-link { flex: none; display: inline-flex; align-items: center; gap: 1px; border: 0; background: none; padding: 4px 0 4px 6px; color: var(--rsd-orange); font-size: 14px; font-weight: 500; }
.rsd-mx-link i { font-size: 17px; }
.rsd-mx-list { display: flex; flex-direction: column; }
.rsd-mx-empty { margin: 0; font-size: 13px; color: var(--rsd-muted); }
.rsd-mx-h { margin: 4px 2px 0 !important; font-size: 13px !important; font-weight: 600 !important; color: var(--rsd-muted) !important; }

/* ИИ-рекомендации: лёгкий тёплый отсвет, строки со значком и стрелкой */
.rsd-mx-ai { background: radial-gradient(120% 60% at 100% 0%, rgba(255, 154, 66, .1), transparent 60%), radial-gradient(90% 50% at 0% 100%, rgba(139, 61, 255, .06), transparent 60%), var(--rsd-card); }
body.dark-only .rsd-mx-ai { background: radial-gradient(120% 60% at 100% 0%, rgba(251, 122, 9, .14), transparent 60%), radial-gradient(90% 50% at 0% 100%, rgba(167, 139, 250, .1), transparent 60%), var(--rsd-gcard, var(--rsd-card)); }
.rsd-mx-rec { display: grid; grid-template-columns: 34px 1fr 16px; align-items: center; gap: 10px; padding: 9px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rsd-mx-rec + .rsd-mx-rec { border-top: 1px solid var(--rsd-line); }
.rsd-mx-rec:active { opacity: .7; }
.rsd-mx-rec > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rsd-mx-rec b { font-size: 14px; font-weight: 500; }
.rsd-mx-rec small { font-size: 12.5px; color: var(--rsd-muted); line-height: 1.3; }
.rsd-mx-rec > i { font-size: 18px; color: var(--rsd-muted); }
.rsd-mx-rec .rsd-sq i { font-size: 18px; }

/* Прогноз: три показателя, столбики по часам (факт — оранжевые, прогноз — светлые) */
.rsd-mx-kpi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rsd-mx-kpi > div { padding: 9px 10px; border-radius: 12px; background: var(--rsd-cell); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rsd-mx-kpi small { font-size: 11.5px; color: var(--rsd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsd-mx-kpi b { font-size: 17px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rsd-mx-kpi2 { grid-template-columns: 1fr 1fr; }
.rsd-mx-or { color: var(--rsd-orange); }
.rsd-mx-hours { display: flex; align-items: flex-end; gap: 3px; height: 72px; padding: 0 2px; }
.rsd-mx-hb { flex: 1; min-width: 0; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--rsd-orange2), var(--rsd-orange)); transform-origin: bottom; animation: rsd-mx-grow .45s ease-out both; }
.rsd-mx-hb-fc { background: repeating-linear-gradient(135deg, rgba(255, 122, 26, .22) 0 3px, rgba(255, 122, 26, .1) 3px 6px); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .3); }
.rsd-mx-hb-now { background: linear-gradient(180deg, var(--rsd-orange2), var(--rsd-orange)); box-shadow: 0 0 0 2px var(--rsd-card), 0 0 0 3.5px rgba(255, 122, 26, .45); }
.rsd-mx-hb-peak { position: relative; }
.rsd-mx-hb-peak::after { content: ''; position: absolute; left: 50%; top: -7px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--rsd-orange); }
@keyframes rsd-mx-grow { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
.rsd-mx-hl { display: flex; gap: 3px; padding: 0 2px; margin-top: -6px; }
.rsd-mx-hl span { flex: 1; min-width: 0; text-align: center; font-size: 10.5px; color: var(--rsd-muted); font-variant-numeric: tabular-nums; overflow: visible; white-space: nowrap; }
.rsd-mx-legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--rsd-muted); margin-top: -4px; }
.rsd-mx-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rsd-mx-legend i { width: 10px; height: 10px; border-radius: 3px; }
.rsd-mx-lg-fact { background: var(--rsd-orange); }
.rsd-mx-lg-fc { background: repeating-linear-gradient(135deg, rgba(255, 122, 26, .3) 0 2px, rgba(255, 122, 26, .12) 2px 4px); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .35); }
.rsd-mx-now { margin-left: auto; }
.rsd-mx-line { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--rsd-cell); font-size: 13.5px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rsd-mx-line .rsd-sq { width: 28px; height: 28px; border-radius: 9px; }
.rsd-mx-line .rsd-sq i { font-size: 16px; }
.rsd-mx-line > span:nth-child(2) { flex: 1; }
.rsd-mx-line > i { font-size: 18px; color: var(--rsd-muted); }

/* Загрузка по часам: тепловая карта, нажатие на клетку — подпись снизу */
.rsd-mx-heat { display: grid; gap: 3px; align-items: center; }
.rsd-mx-wd { font-size: 11px; color: var(--rsd-muted); }
.rsd-mx-c { display: block; aspect-ratio: 1; border-radius: 5px; background: var(--rsd-cell); cursor: pointer; transition: transform .15s ease-out; -webkit-tap-highlight-color: transparent; }
.rsd-mx-c1 { background: rgba(255, 122, 26, .16); }
.rsd-mx-c2 { background: rgba(255, 122, 26, .34); }
.rsd-mx-c3 { background: rgba(255, 122, 26, .6); }
.rsd-mx-c4 { background: linear-gradient(135deg, var(--rsd-orange2), var(--rsd-orange)); }
.rsd-mx-c.on { box-shadow: 0 0 0 2px var(--rsd-card), 0 0 0 3.5px var(--rsd-text); transform: scale(1.08); position: relative; z-index: 1; }
.rsd-mx-hlab { font-size: 10px; color: var(--rsd-muted); text-align: center; white-space: nowrap; overflow: visible; }
.rsd-mx-heat-foot { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--rsd-muted); }
.rsd-mx-heat-foot b { font-weight: 500; color: var(--rsd-text); }
.rsd-mx-scale { display: inline-flex; gap: 2px; flex: none; }
.rsd-mx-scale i { width: 10px; height: 10px; border-radius: 3px; cursor: default; }
.rsd-mx-heat-sel { min-width: 0; }

/* Топ блюд */
.rsd-mx-dish { display: grid; grid-template-columns: 22px 42px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; }
.rsd-mx-dish + .rsd-mx-dish { border-top: 1px solid var(--rsd-line); }
.rsd-mx-rank { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--rsd-cell); color: var(--rsd-muted); }
.rsd-mx-rank1 { background: linear-gradient(135deg, var(--rsd-orange), var(--rsd-orange2)); color: #fff; }
.rsd-mx-dish img, .rsd-mx-noimg { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: var(--rsd-cell); }
.rsd-mx-noimg { display: inline-flex; align-items: center; justify-content: center; color: var(--rsd-muted); font-size: 20px; }
.rsd-mx-dish-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rsd-mx-dish-t b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsd-mx-dish-t small { font-size: 12px; color: var(--rsd-muted); }
.rsd-mx-dish em { font-style: normal; font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rsd-mx-dbar { display: block; height: 4px; border-radius: 2px; background: rgba(17, 24, 39, .07); overflow: hidden; margin-top: 2px; }
body.dark-only .rsd-mx-dbar { background: rgba(255, 255, 255, .09); }
.rsd-mx-dbar > span { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--rsd-orange), var(--rsd-orange2)); }
.rsd-mx-dbar-l { height: 8px; border-radius: 4px; margin: 0; }
.rsd-mx-dbar-l > span { border-radius: 4px; }

/* Способ получения: одна составная полоска и три строки */
.rsd-mx-stack { display: flex; gap: 3px; height: 12px; border-radius: 6px; overflow: hidden; }
.rsd-mx-stack span { min-width: 6px; }
.rsd-mx-sk-blue, .rsd-mx-dot-blue { background: var(--rsd-blue); }
.rsd-mx-sk-orange, .rsd-mx-dot-orange { background: var(--rsd-orange); }
.rsd-mx-sk-green, .rsd-mx-dot-green { background: var(--rsd-green); }
.rsd-mx-chs { display: flex; flex-direction: column; }
.rsd-mx-chs > div { display: grid; grid-template-columns: 10px 1fr auto 44px; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.rsd-mx-chs > div + div { border-top: 1px solid var(--rsd-line); }
.rsd-mx-chs i { width: 10px; height: 10px; border-radius: 3px; }
.rsd-mx-chs b { font-weight: 600; font-variant-numeric: tabular-nums; }
.rsd-mx-chs em { font-style: normal; font-size: 12px; font-weight: 500; text-align: center; padding: 2px 0; border-radius: 7px; background: var(--rsd-cell); color: var(--rsd-muted); }

/* Лояльность */
.rsd-mx-seg3 { grid-template-columns: repeat(3, 1fr); width: 100%; }
.rsd-mx-loy { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rsd-mx-loy > div { padding: 11px 12px; border-radius: 14px; display: flex; flex-direction: column; gap: 2px; }
.rsd-mx-loy small { font-size: 12px; color: var(--rsd-muted); }
.rsd-mx-loy b { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rsd-mx-loy-in { background: var(--rsd-green-soft); }
.rsd-mx-loy-in b { color: var(--rsd-green); }
.rsd-mx-loy-out { background: var(--rsd-orange-soft); }
.rsd-mx-loy-out b { color: #d4570a; }
body.dark-only .rsd-mx-loy-out b { color: #ffa45c; }
.rsd-mx-use { display: flex; flex-direction: column; gap: 5px; }
.rsd-mx-use small { font-size: 12px; color: var(--rsd-muted); }
.rsd-mx-kpi2 > div { background: none; box-shadow: inset 0 0 0 1px var(--rsd-line); }

/* Лента событий: значки статуса на вертикальной линии */
.rsd-mx-ev { display: flex; flex-direction: column; }
.rsd-mx-evr { position: relative; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 7px 0; }
.rsd-mx-evr:not(:last-child)::before { content: ''; position: absolute; left: 14px; top: 37px; bottom: -7px; width: 2px; border-radius: 1px; background: var(--rsd-line); }
.rsd-mx-evi { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.rsd-mx-evi-blue { background: var(--rsd-blue-soft); color: var(--rsd-blue); }
.rsd-mx-evi-orange { background: var(--rsd-orange-soft); color: var(--rsd-orange); }
.rsd-mx-evi-green { background: var(--rsd-green-soft); color: var(--rsd-green); }
.rsd-mx-evi-red { background: var(--rsd-red-soft); color: var(--rsd-red); }
.rsd-mx-evi-gray { background: var(--rsd-cell); color: var(--rsd-muted); }
.rsd-mx-evt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rsd-mx-evt b { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.rsd-mx-evt small { font-size: 12px; color: var(--rsd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsd-mx-st { font-style: normal; font-size: 11.5px; font-weight: 500; padding: 1px 7px; border-radius: 7px; }
.rsd-mx-st-blue { background: var(--rsd-blue-soft); color: var(--rsd-blue); }
.rsd-mx-st-orange { background: var(--rsd-orange-soft); color: #d4570a; }
.rsd-mx-st-green { background: var(--rsd-green-soft); color: var(--rsd-green); }
.rsd-mx-st-red { background: var(--rsd-red-soft); color: var(--rsd-red); }
.rsd-mx-st-gray { background: var(--rsd-cell); color: var(--rsd-muted); }
body.dark-only .rsd-mx-st-orange { color: #ffa45c; }
.rsd-mx-evm { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rsd-mx-evm b { font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rsd-mx-evm small { font-size: 11.5px; color: var(--rsd-muted); white-space: nowrap; }

/* Ещё действия: лёгкие плитки в три колонки */
.rsd-mx-acts { display: flex; flex-direction: column; gap: 8px; }
.rsd-mx-acts > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rsd-mx-act { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 11px 6px 12px; border: 1px solid var(--rsd-line); border-radius: 16px; background: var(--rsd-card);
  color: var(--rsd-text); font-size: 12.5px; font-weight: 500; line-height: 1.2; text-align: center; -webkit-tap-highlight-color: transparent; transition: transform .15s ease-out; }
.rsd-mx-act:active, .rsd-mx-c:active { transform: scale(.96); }
body.dark-only .rsd-mx-act { background: var(--rsd-gcard, var(--rsd-card)); border-color: var(--rsd-glass-line); }
.rsd-mx-act .rsd-sq i { font-size: 19px; }
@media (max-width: 380px) {
  .rsd-mx-kpi b { font-size: 15.5px; }
  .rsd-mx-loy b { font-size: 18px; }
  .rsd-mx-head h2 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .rsd-mx-hb { animation: none; } }

/* Главная: «Быстрые действия» — сетка 4 × 2 как плитки меню (заменили два разных ряда кнопок) */
.rsd-qa { display: flex; flex-direction: column; gap: 10px; }
.rsd-qa-h { margin: 2px 2px 0 !important; font-size: 16.5px !important; font-weight: 600 !important; letter-spacing: -0.01em; }
.rsd-qa-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rsd-qa-t { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; min-height: 90px; padding: 11px 3px 10px;
  border: 1px solid #f0f1f3; border-radius: 18px; background: #fff; color: var(--rsd-text); font: inherit;
  box-shadow: 0 8px 18px -12px rgba(16, 24, 40, .25), 0 1px 2px rgba(16, 24, 40, .04); -webkit-tap-highlight-color: transparent; transition: transform .12s ease-out; }
.rsd-qa-t:active { transform: scale(.96); }
.rsd-qa-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: #f3f4f6; color: #1f2937; }
.rsd-qa-l { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%;
  font-size: 12px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; text-align: center; }
.rsd-qa-accent { background: linear-gradient(180deg, #fff5ee, #ffe9da); border-color: #ffd9bd; box-shadow: 0 8px 18px -12px rgba(251, 122, 9, .5); }
.rsd-qa-accent .rsd-qa-ic { background: rgba(255, 255, 255, .75); color: var(--rsd-orange); }
body.dark-only .rsd-qa-t { background: var(--rsd-gcard); border-color: var(--rsd-gcard-line); box-shadow: var(--rsd-gcard-shadow); color: #e5e7eb;
  -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%); }
body.dark-only .rsd-qa-ic { background: rgba(255, 255, 255, .07); color: #e5e7eb; }
body.dark-only .rsd-qa-accent { background: radial-gradient(120% 80% at 50% 0%, rgba(251, 122, 9, .3), transparent 70%), linear-gradient(165deg, rgba(62, 64, 72, .42), rgba(22, 23, 27, .5)); }
body.dark-only .rsd-qa-accent .rsd-qa-ic { background: rgba(251, 122, 9, .2); color: #ffa45c; }
@media (max-width: 380px) {
  .rsd-qa-t { min-height: 84px; gap: 7px; padding: 10px 2px 9px; }
  .rsd-qa-ic { width: 42px; height: 42px; }
  .rsd-qa-l { font-size: 11.5px; }
}
