/* RU: ПК4 «Сменить бизнес»: кнопка в шапке, меню под ней (компьютер) и нижний лист (телефон). Цвета — из токенов пульта.
   EN: PK4 "Switch business": the header button, the menu (desktop) and the bottom sheet (phone). Colours from the panel tokens. */
.sw-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 260px; padding: 4px 8px 4px 4px;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; min-width: 0; }
.sw-btn:hover, .sw-btn[aria-expanded="true"] { border-color: var(--line); background: var(--surface-2, var(--bg)); }
.sw-btn:focus-visible, .sw-it:focus-visible { outline: 2px solid var(--focus-c, var(--acc)); outline-offset: 2px; }
.sw-nm { display: grid; min-width: 0; text-align: left; line-height: 1.2; }
.sw-nm b { font-size: var(--fs-sm, 14px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-nm span { font-size: var(--fs-xs, 12px); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-caret { color: var(--muted); font-size: 12px; }
.sw-lt { width: 30px; height: 30px; border-radius: 8px; color: #fff; font-weight: 750; font-size: 14px; display: inline-grid; place-items: center; flex-shrink: 0; }
.sw-lt.sw-big { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; margin: 0 auto 10px; }
.sw-c0 { background: #2a63c9; } .sw-c1 { background: #0f7a6b; } .sw-c2 { background: #c25a1f; }
.sw-c3 { background: #5b3fb3; } .sw-c4 { background: #a3302f; } .sw-c5 { background: #55544f; }
.sw-menu { position: absolute; z-index: var(--z-sheet, 31); max-height: min(70vh, 520px); overflow: auto; padding: 8px; background: var(--surface, #fff);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 34px rgba(0, 0, 0, .18); }
.sw-menu.sw-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 82vh; border-radius: 16px 16px 0 0;
  padding: 10px 10px calc(16px + env(safe-area-inset-bottom, 0px)); }
.sw-menu.sw-sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 8px; }
.sw-shade { position: fixed; inset: 0; z-index: var(--z-overlay, 30); background: var(--overlay, rgba(0, 0, 0, .3)); }
.sw-mh { font-size: 12px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; }
.sw-it { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.sw-it:hover { background: var(--surface-2, var(--bg)); }
.sw-it[aria-current="true"] { background: var(--acc-soft); }
.sw-it[disabled] { opacity: .55; cursor: default; }
.sw-it .sw-nm { flex: 1; }
.sw-cnt { background: var(--bad, #a3302f); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.sw-err { margin: 6px 8px 2px; color: var(--bad, #a3302f); font-size: var(--fs-xs, 12px); }
.sw-go { position: fixed; inset: 0; z-index: var(--z-toast, 60); display: grid; place-items: center; text-align: center; background: var(--bg, #f6f6f3); color: var(--ink); }
/* RU: ПК5: серая строка «обновляется» (нажать можно), пометка устаревшего списка, окно отказа с запасным путём.
   EN: PK5: a grey "updating" row (still tappable), the stale-list note, the refusal box with the fallback. */
.sw-it.sw-busy { opacity: .62; }
.sw-note { margin: 6px 8px 2px; color: var(--muted); font-size: var(--fs-xs, 12px); }
.sw-go.sw-fail { background: var(--overlay, rgba(0, 0, 0, .3)); padding: 16px; }
.sw-fail > div { max-width: 360px; width: 100%; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 8px; }
.sw-fail > div > span { color: var(--muted); font-size: var(--fs-sm, 14px); }
.sw-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 6px 0 0; }
/* RU: ПК6–ПК8: окна «Связать входы» и «Кто за компьютером?», код связки, кнопки людей и цифровая панель.
   EN: PK6–PK8: the link and "Who is at the computer?" dialogs, the link code, people buttons and the keypad. */
.sw-dlg > div { max-width: 400px; max-height: calc(100vh - 32px); overflow: auto; text-align: left; }
.sw-dlg > div > b { font-size: var(--fs-md, 17px); }
.sw-stp { font-size: var(--fs-xs, 12px); color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.sw-code { display: grid; gap: 2px; margin: 4px 0; padding: 10px 12px; border-radius: 12px; background: var(--acc-soft); text-align: center; }
.sw-code b { font-size: 26px; letter-spacing: .12em; }
.sw-msg { margin: 0; font-size: var(--fs-sm, 14px); }
.sw-msg.bad { color: var(--bad, #a3302f); } .sw-msg.ok { color: var(--ok, #0f7a6b); }
.sw-dlg .fld { display: grid; gap: 4px; }
.sw-dlg .sw-acts { justify-content: flex-start; }
.sw-lt.sw-plus { background: var(--surface-2, #eceae4); color: var(--ink); }
.dk-btn { white-space: nowrap; }
.dk-people { display: grid; gap: 6px; }
.dk-pp { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface, #fff); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.dk-pp[aria-pressed="true"] { background: var(--acc-soft); }
.dk-pp:focus-visible, .dk-pad button:focus-visible { outline: 2px solid var(--focus-c, var(--acc)); outline-offset: 2px; }
.dk-nm { display: grid; } .dk-nm span { font-size: var(--fs-xs, 12px); color: var(--muted); }
.dk-bh { display: flex; align-items: center; gap: 10px; }
.dk-dots { display: flex; gap: 12px; justify-content: center; margin: 8px 0; }
.dk-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); }
.dk-dots span.f { background: var(--ink); border-color: var(--ink); }
.dk-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dk-pad button { min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); color: var(--ink);
  font: inherit; font-size: 20px; font-weight: 650; cursor: pointer; }
.dk-pad button:active { background: var(--acc-soft); }
@media (max-width: 700px) {
  .dk-btn .dk-lbl { display: none; }
  .sw-btn { max-width: 52px; padding: 4px; }
  .sw-btn .sw-nm, .sw-btn .sw-caret { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .sw-menu.sw-sheet { animation: sw-up .18s ease-out; }
  @keyframes sw-up { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
}
