/* Экран брендов («пульт брендов») и его окна: тёмно-золотой стиль клиентской панели.
   Работает только при body.gold-screen, разделы внутри бренда не затрагивает. */

body.gold-screen,
body.gold-section,
.modal.modal-gold {
  --g-bg: #040405;
  --g-card: #121316;
  --g-card-2: #0a0b0d;
  --g-gold: #e5ac45;
  --g-gold-bright: #f4bf5c;
  --g-gold-light: #ffd785;
  --g-bronze: #a8722e;
  --g-line: rgba(229, 172, 69, 0.22);
  --g-line-strong: rgba(244, 191, 92, 0.55);
  --g-text: #f1f1f2;
  --g-text-2: #a1a6af;
  --g-muted: #8a909b;
  --g-on-gold: #17130d;
  --g-ok: #34d399;
  --g-warn: #ffb938;
  --g-err: #f5576c;

  /* Общие токены панели: окна на этом экране становятся тёмными сами */
  --bg: var(--g-bg);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: var(--g-text);
  --text-muted: var(--g-text-2);
  --text-light: var(--g-muted);
  --primary: var(--g-gold);
  --primary-dark: var(--g-gold-bright);
  --primary-glow: rgba(229, 172, 69, 0.2);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --color-bg-white: var(--g-card);
  --color-bg-light: var(--g-card-2);
  --color-bg-muted: var(--g-card-2);
  --color-primary-dark: var(--g-text);
  --color-primary: var(--g-text);
  --color-accent-blue: var(--g-gold);
  --color-accent-secondary: var(--g-gold-bright);
  --color-glass: rgba(229, 172, 69, 0.08);
  --gradient-primary: linear-gradient(180deg, #ffd785 0%, #f4bf5c 35%, #e5ac45 70%, #a8722e 100%);
  --gradient-surface: none;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 transparent;
  background: var(--g-bg);
  color: var(--g-text);
  font-family: Inter, Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

#brands-screen {
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(229, 172, 69, 0.15), transparent 62%),
    radial-gradient(900px 600px at -10% 110%, rgba(168, 114, 46, 0.07), transparent 60%),
    var(--g-bg);
}

/* Шапка */
.bp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 66px;
  padding: 0 max(32px, calc((100vw - 1320px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(5, 5, 7, 0.92);
}
.bp-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(229, 172, 69, 0.08), rgba(244, 191, 92, 0.55) 35%, rgba(229, 172, 69, 0.25) 70%, rgba(229, 172, 69, 0.06));
}
.bp-logo { display: flex; align-items: center; gap: 11px; color: var(--g-gold-bright); white-space: nowrap; }
.bp-logo svg { width: 23px; height: 23px; flex: none; }
.bp-logo span { font-family: Cinzel, Georgia, serif; font-size: 18px; font-weight: 700; letter-spacing: 0.1em; }

.bp-user { position: relative; }
.bp-user-btn {
  height: 52px;
  padding: 0 14px 0 5px;
  gap: 11px;
  border-radius: 999px;
  background: #121316;
  border: 1px solid var(--g-line);
  color: var(--g-text);
  text-align: left;
}
.bp-user-btn:hover, .bp-user-btn[aria-expanded="true"] { border-color: var(--g-line-strong); }
.bp-user-btn svg { width: 16px; height: 16px; flex: none; color: var(--g-text-2); }
.bp-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--g-gold-bright);
  background: #0a0b0d;
  color: var(--g-gold-light);
  font-size: 16px;
  font-weight: 700;
}
.bp-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.bp-user-text b { max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 700; }
.bp-user-text small { font-size: 12px; font-weight: 500; color: var(--g-gold-bright); }
.bp-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 260px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  background: #101115;
  border: 1px solid var(--g-line);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.65);
}
.bp-menu button {
  justify-content: flex-start;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--g-text);
  font-size: 14px;
  font-weight: 500;
}
.bp-menu button svg { width: 18px; height: 18px; flex: none; color: var(--g-gold-bright); }
.bp-menu button:hover { background: rgba(229, 172, 69, 0.1); color: var(--g-gold-light); }
.bp-menu .bp-menu-out { position: relative; margin-top: 13px; color: #ff8c9b; }
.bp-menu .bp-menu-out::before { content: ""; position: absolute; left: 4px; right: 4px; top: -7px; height: 1px; background: rgba(255, 255, 255, 0.09); }
.bp-menu .bp-menu-out svg { color: #ff8c9b; }
.bp-menu .bp-menu-out:hover { background: rgba(245, 87, 108, 0.12); color: #ffb3bd; }

.bp-main { max-width: 1384px; margin: 0 auto; padding: 26px 32px 48px; }
.bp-title-main { margin-bottom: 18px; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: var(--g-text); }

/* Сетка и карточка бренда */
.bp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bp-grid.few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bp-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 20px 18px;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(229, 172, 69, 0.07), transparent 55%) padding-box,
    linear-gradient(180deg, #15161a 0%, #0a0b0d 100%) padding-box,
    linear-gradient(150deg, rgba(255, 215, 133, 0.55), rgba(168, 114, 46, 0.22) 30%, rgba(255, 255, 255, 0.05) 60%, rgba(168, 114, 46, 0.3)) border-box;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.bp-card:hover { transform: translateY(-2px); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), 0 0 36px rgba(229, 172, 69, 0.12); }
.bp-card.alarm {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 185, 56, 0.09), transparent 55%) padding-box,
    linear-gradient(180deg, #17150f 0%, #0a0b0d 100%) padding-box,
    linear-gradient(150deg, rgba(255, 185, 56, 0.8), rgba(255, 185, 56, 0.25) 34%, rgba(255, 255, 255, 0.05) 62%, rgba(168, 114, 46, 0.3)) border-box;
}
.bp-card.archived .bp-card-head { opacity: 0.75; }
.bp-archived-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.bp-archived-acts button { flex: 1 1 130px; height: 42px; border-radius: 11px; font-size: 14px; font-weight: 700; }
.bp-btn-ghost { background: rgba(255, 255, 255, 0.045); border: 1px solid var(--g-line); color: var(--g-text); }
.bp-btn-ghost:hover { border-color: var(--g-line-strong); color: var(--g-gold-light); }
.bp-btn-danger { background: rgba(245, 87, 108, 0.12); border: 1px solid rgba(245, 87, 108, 0.35); color: #ff8c9b; }
.bp-btn-danger:hover { background: rgba(245, 87, 108, 0.22); }

.bp-card-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bp-seal { position: relative; width: 62px; height: 62px; flex: none; }
.bp-seal svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.bp-seal .track { fill: none; stroke: rgba(229, 172, 69, 0.16); stroke-width: 3; }
.bp-seal .arc { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset 1.4s cubic-bezier(0.45, 0, 0.15, 1); }
.bp-seal-mark {
  position: absolute;
  inset: 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--g-gold-light);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
}
.bp-seal-mark .brand-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
/* Фото заполняет круг само, прозрачный логотип виден один */
.bp-seal-mark .brand-logo.cut { width: 82%; height: 82%; border-radius: 0; object-fit: contain; }
.bp-card-title { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.bp-card-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--g-text);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.bp-card-open { padding: 0; border-radius: 0; background: none; text-align: left; }
.bp-card-desc { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; line-height: 1.4; color: var(--g-text-2); }
/* Вся карточка открывает бренд */
.bp-card-open::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.bp-card-open:focus-visible { outline: none; }
.bp-card-open:focus-visible::after { outline: 2px solid var(--g-gold-light); }
.bp-card:hover .bp-card-open { color: var(--g-gold-light); }

.bp-states { display: flex; flex-wrap: wrap; column-gap: 12px; }
.bp-state { padding: 0; background: none; border-radius: 4px; font-size: 13px; line-height: 1.5; font-weight: 600; text-align: left; }
.bp-state.ok { color: var(--g-ok); }
.bp-state.warn { color: var(--g-warn); }
.bp-state.err { color: var(--g-err); }
.bp-state.off { color: var(--g-text-2); }
button.bp-state { position: relative; z-index: 2; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
button.bp-state:hover { text-decoration-color: currentColor; }

.bp-gear {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--g-muted);
}
.bp-gear svg { width: 18px; height: 18px; }
.bp-gear:hover, .bp-gear:focus-visible { color: var(--g-gold-bright); background: rgba(229, 172, 69, 0.1); }

/* Три плитки: цифра и вход в раздел */
.bp-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.bp-tile {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 80px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--g-text);
  text-align: left;
  line-height: 1.3;
}
button.bp-tile:hover { border-color: var(--g-line-strong); background: rgba(229, 172, 69, 0.08); }
.bp-tile strong { font-size: 24px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.bp-tile strong small { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--g-muted); }
.bp-tile span { font-size: 12.5px; font-weight: 500; color: var(--g-text-2); }
.bp-tile span em { font-style: normal; color: var(--g-gold-light); white-space: nowrap; }
.bp-tile.hot { border-color: var(--g-line-strong); background: linear-gradient(180deg, rgba(244, 191, 92, 0.2), rgba(168, 114, 46, 0.1)); box-shadow: inset 0 1px 0 rgba(255, 226, 150, 0.2); }
button.bp-tile.hot:hover { background: linear-gradient(180deg, rgba(244, 191, 92, 0.28), rgba(168, 114, 46, 0.14)); }
.bp-tile.hot strong { color: var(--g-gold-light); }
.bp-tile.zero strong { color: var(--g-muted); }
.bp-tile.run strong { font-size: 18px; color: var(--g-ok); }
.bp-tile.stop strong { font-size: 18px; color: var(--g-text-2); }
.bp-tile.warn strong { color: var(--g-warn); }

/* Низ карточки */
.bp-foot { display: flex; align-items: center; gap: 12px; min-width: 0; margin-top: auto; }
.bp-spark { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 4px; height: 30px; flex: none; }
.bp-spark i { width: 9px; border-radius: 2px; background: linear-gradient(180deg, #ffd785, #e5ac45 55%, #a8722e); }
.bp-spark i.none { height: 2px; background: rgba(255, 255, 255, 0.12); }
.bp-foot small { min-width: 0; font-size: 12.5px; line-height: 1.35; color: var(--g-text-2); }
.bp-foot small b { color: var(--g-text); font-weight: 600; }
.bp-enter {
  position: relative;
  z-index: 2;
  height: 40px;
  flex: none;
  margin-left: auto;
  padding: 0 18px;
  border-radius: 11px;
  background: linear-gradient(180deg, #ffd785 0%, #f4bf5c 35%, #e5ac45 70%, #a8722e 100%);
  box-shadow: 0 8px 22px rgba(229, 172, 69, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: var(--g-on-gold);
  font-size: 14px;
  font-weight: 700;
}
.bp-enter:hover { filter: brightness(1.07); }

/* Плитка «Новый бренд» */
.bp-add {
  min-height: 240px;
  flex-direction: column;
  gap: 10px;
  border-radius: 18px;
  border: 1px dashed rgba(229, 172, 69, 0.35);
  background: rgba(229, 172, 69, 0.025);
  color: var(--g-text-2);
  font-size: 15px;
  font-weight: 500;
}
.bp-add:hover { border-color: var(--g-line-strong); background: rgba(229, 172, 69, 0.06); color: var(--g-gold-light); }
.bp-add span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--g-line-strong); color: var(--g-gold-bright); font-size: 26px; font-weight: 400; line-height: 1; }

.bp-empty { padding: 8px 0 20px; font-size: 16px; color: var(--g-text-2); }
.bp-archive { margin-top: 14px; }
.bp-archive summary { width: max-content; padding: 10px 0; cursor: pointer; font-size: 14px; color: var(--g-text-2); }
.bp-archive summary:hover { color: var(--g-gold-bright); }
.bp-archive .bp-grid { margin-top: 8px; }

/* Скелетоны */
.bp-skel { min-height: 245px; overflow: hidden; background: #101114; border-color: rgba(255, 255, 255, 0.06); }
.bp-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(229, 172, 69, 0.07), transparent);
  animation: bp-shimmer 1.3s infinite;
}
@keyframes bp-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Окна на экране брендов: те же золотая рамка и поверхности, что у карточек */
body.gold-screen .modal-overlay { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: none; }
body.gold-screen .modal, .modal.modal-gold {
  border: 1px solid transparent;
  border-radius: 20px;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(229, 172, 69, 0.09), transparent 55%) padding-box,
    linear-gradient(180deg, #15161a 0%, #0a0b0d 100%) padding-box,
    linear-gradient(150deg, rgba(255, 215, 133, 0.7), rgba(168, 114, 46, 0.28) 30%, rgba(255, 255, 255, 0.07) 62%, rgba(168, 114, 46, 0.45)) border-box;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 50px rgba(229, 172, 69, 0.1);
}
body.gold-screen .modal-header, .modal.modal-gold .modal-header { padding: 18px 22px; background: none; border-bottom-color: rgba(229, 172, 69, 0.18); }
body.gold-screen .modal-header h3, .modal.modal-gold .modal-header h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
body.gold-screen .modal-close, .modal.modal-gold .modal-close { width: 38px; height: 38px; border-radius: 11px; background: rgba(20, 23, 27, 0.85); border-color: var(--g-line); }
body.gold-screen .modal-close:hover, .modal.modal-gold .modal-close:hover { border-color: var(--g-line-strong); color: var(--g-gold-light); }
body.gold-screen .modal-body, .modal.modal-gold .modal-body { padding: 20px 22px; }
body.gold-screen .modal-footer, .modal.modal-gold .modal-footer { padding: 16px 22px; background: none; border-top-color: rgba(229, 172, 69, 0.18); }
body.gold-screen .modal-footer button, .modal.modal-gold .modal-footer button { min-height: 42px; border-radius: 11px; font-size: 14px; }
body.gold-screen .modal-body label, .modal.modal-gold .modal-body label { margin-bottom: 7px; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }
body.gold-screen .modal-body input:not([type="checkbox"]):not([type="color"]), .modal.modal-gold .modal-body input:not([type="checkbox"]):not([type="color"]),
body.gold-screen .modal-body select, .modal.modal-gold .modal-body select { min-height: 44px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 11px; background-color: #08090b; font-size: 14px; }
body.gold-screen .modal-body input:focus, .modal.modal-gold .modal-body input:focus,
body.gold-screen .modal-body select:focus, .modal.modal-gold .modal-body select:focus { border-color: var(--g-line-strong); box-shadow: 0 0 0 3px rgba(229, 172, 69, 0.14); background-color: #08090b; }
body.gold-screen .modal .btn-primary, .modal.modal-gold .btn-primary { background: linear-gradient(180deg, #ffd785 0%, #f4bf5c 35%, #e5ac45 70%, #a8722e 100%); color: var(--g-on-gold); box-shadow: 0 8px 22px rgba(229, 172, 69, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
body.gold-screen .modal .btn-primary:hover, .modal.modal-gold .btn-primary:hover { transform: none; filter: brightness(1.07); }
body.gold-screen .modal .btn-secondary, .modal.modal-gold .btn-secondary { background: rgba(255, 255, 255, 0.045); border: 1px solid var(--g-line); }
body.gold-screen .modal .btn-secondary:hover, .modal.modal-gold .btn-secondary:hover { border-color: var(--g-line-strong); color: var(--g-gold-light); }
body.gold-screen .modal .btn-danger, .modal.modal-gold .btn-danger { background: rgba(245, 87, 108, 0.12); border: 1px solid rgba(245, 87, 108, 0.3); color: #ff8c9b; box-shadow: none; }
body.gold-screen .modal .btn-danger:hover, .modal.modal-gold .btn-danger:hover { transform: none; background: rgba(245, 87, 108, 0.22); box-shadow: none; }

/* Настройки бренда */
body.gold-screen .modal-brand-form .form-group, .modal.modal-gold .modal-brand-form .form-group { margin-bottom: 18px; }
body.gold-screen .modal-brand-form .form-group input[type="text"], .modal.modal-gold .modal-brand-form .form-group input[type="text"] { margin-bottom: 0; }
body.gold-screen .brand-preview, .modal.modal-gold .brand-preview {
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--g-line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(229, 172, 69, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--g-text);
}
.brand-preview .bp-seal { width: 76px; height: 76px; }
.brand-preview .bp-seal-mark { font-size: 36px; }
.brand-preview .track.gold { stroke: #e5ac45; stroke-width: 2.5; }
.brand-preview .bp-card-name { font-size: 22px; }
button.bp-seal.upload { padding: 0; border-radius: 50%; background: none; cursor: pointer; }
button.bp-seal.upload:hover .bp-seal-mark { filter: brightness(1.12); }
button.bp-seal.upload:focus-visible { outline: 2px solid var(--g-gold-light); outline-offset: 3px; }
.brand-preview .bp-seal .bp-camera {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #121316;
  background: linear-gradient(180deg, #ffd785, #e5ac45 60%, #a8722e);
  color: var(--g-on-gold);
}
.brand-preview .bp-seal .bp-camera svg { position: static; width: 16px; height: 16px; transform: none; }
.brand-preview.over { border-color: var(--g-gold-light); background: rgba(229, 172, 69, 0.14); }
.brand-logo-remove { min-height: 28px; padding: 2px 0; background: none; color: #ff8c9b; font-size: 13px; font-weight: 600; }
.brand-logo-remove:hover { text-decoration: underline; }

/* Знак бренда в шапке раздела и в подтверждении запуска */
.brand-chip-emoji .brand-logo { display: block; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.confirm-brand-emoji .brand-logo { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand-chip-emoji:has(.brand-logo) { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: #0a0b0d; }
.confirm-brand-emoji:has(.brand-logo) { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; background: #0a0b0d; }
.brand-chip-emoji .brand-logo.cut { width: 22px; height: 22px; border-radius: 0; object-fit: contain; }
.confirm-brand-emoji .brand-logo.cut { width: 40px; height: 40px; border-radius: 0; object-fit: contain; }

body.gold-screen .data-table, .modal.modal-gold .data-table { background: transparent; border: 0; box-shadow: none; }
body.gold-screen .data-table th, .modal.modal-gold .data-table th { background: #0c0d0f; color: var(--g-text-2); }
body.gold-screen .data-table td, .modal.modal-gold .data-table td { color: var(--g-text); }
body.gold-screen .data-table tbody tr, .modal.modal-gold .data-table tbody tr,
body.gold-screen .data-table tbody tr:nth-child(even), .modal.modal-gold .data-table tbody tr:nth-child(even) { background: transparent; }
body.gold-screen .data-table tbody tr:hover, .modal.modal-gold .data-table tbody tr:hover { background: rgba(229, 172, 69, 0.05); }
body.gold-screen .accounts-table-wrap, .modal.modal-gold .accounts-table-wrap { background: transparent; border-color: var(--border); }
body.gold-screen .shared-chip, .modal.modal-gold .shared-chip { background: transparent; color: var(--g-text); border-color: var(--g-line-strong); }
body.gold-screen .perm-matrix th, .modal.modal-gold .perm-matrix th { background: #0c0d0f; }
body.gold-screen .soft-select, .modal.modal-gold .soft-select { background-color: #0a0b0d; color: var(--g-text); border-color: var(--border); }

@media (max-width: 1100px) {
  .bp-grid, .bp-grid.few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .bp-header { height: 60px; padding: 0 14px; }
  .bp-logo { gap: 8px; }
  .bp-logo svg { width: 19px; height: 19px; }
  .bp-logo span { font-size: 14px; }
  .bp-user-text { display: none; }
  .bp-user-btn { padding-right: 10px; gap: 8px; }
  .bp-main { padding: 16px 14px 40px; }
  .bp-title-main { margin-bottom: 14px; font-size: 24px; }
  .bp-grid, .bp-grid.few { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bp-card { padding: 16px; gap: 14px; }
  .bp-spark { gap: 3px; }
  .bp-spark i { width: 6px; }
  .bp-foot { gap: 10px; }
  .bp-seal { width: 54px; height: 54px; }
  .bp-seal-mark { font-size: 25px; }
  .bp-card-name { font-size: 18px; }
  .bp-tile { padding: 10px; }
  .bp-tile strong { font-size: 21px; }
  .bp-gear { width: 44px; height: 44px; }
  .bp-enter { height: 44px; }
  .bp-add { min-height: 76px; flex-direction: row; }
  .bp-add span { width: 36px; height: 36px; font-size: 21px; }
  body.gold-screen .modal-footer, .modal.modal-gold .modal-footer { flex-wrap: wrap; padding: 14px; }
  body.gold-screen .modal-footer button, .modal.modal-gold .modal-footer button { min-width: 0; padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .bp-skel::after { animation: none; }
  .bp-card, .bp-seal .arc { transition: none; }
  .bp-card:hover { transform: none; }
}

/* ---------- Экран входа ---------- */
#login-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 22px;
  overflow: hidden;
  background: #040405;
  color: #f1f1f2;
  font-family: Inter, Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
#login-screen::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, #f4bf5c 50%, transparent); }
.lg-box { width: 360px; max-width: 100%; }
.lg-brand { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: 40px; color: #f4bf5c; font-family: Cinzel, Georgia, serif; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: 0.1em; text-align: center; }
.lg-brand svg { width: 44px; height: 44px; }
#login-form { display: flex; flex-direction: column; gap: 22px; }
.lg-field { position: relative; }
.lg-field label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; color: #a1a6af; }
#login-screen .lg-field input {
  width: 100%;
  height: 54px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #f1f1f2;
  font: inherit;
  font-size: 17px;
  color-scheme: dark;
}
#login-screen .lg-field input::placeholder { color: #6f7682; }
#login-screen .lg-field input:focus { border-bottom-color: #f4bf5c; box-shadow: 0 1px 0 #f4bf5c; }
#login-screen .lg-pass input { padding-right: 50px; }
/* Подставленные браузером логин и пароль не должны становиться белыми плашками */
#login-screen .lg-field input:-webkit-autofill { -webkit-text-fill-color: #f1f1f2; caret-color: #f1f1f2; transition: background-color 100000s 0s; }
.lg-eye { position: absolute; right: 0; bottom: 5px; width: 44px; height: 44px; padding: 0; border-radius: 9px; background: none; color: #a1a6af; }
.lg-eye svg { width: 20px; height: 20px; }
.lg-eye:hover, .lg-eye[aria-pressed="true"] { color: #f4bf5c; }
#login-screen .lg-go {
  height: 52px;
  margin-top: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd785 0%, #f4bf5c 35%, #e5ac45 70%, #a8722e 100%);
  box-shadow: 0 10px 28px rgba(229, 172, 69, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #17130d;
  font-size: 16px;
  font-weight: 700;
}
#login-screen .lg-go:hover { filter: brightness(1.07); }
#login-screen button:focus-visible { outline: 2px solid #ffd785; outline-offset: 2px; }
#login-screen .error { min-height: 20px; margin: -8px 0 0; text-align: center; font-size: 14px; color: #ff8c9b; }

/* ---------- Окно сотрудника ---------- */
.modal.modal-gold { color-scheme: dark; }
.modal.modal-gold.modal-staff { max-width: 880px; }
.modal.modal-staff .modal-body input[type="text"],
.modal.modal-staff .modal-body input[type="password"] { margin-bottom: 0; }
.modal.modal-staff .modal-body input:disabled { opacity: 0.55; }
.sf-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.sf-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.sf-role { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.025); color: var(--g-text); text-align: left; }
.sf-role b { font-size: 15px; }
.sf-role span { font-size: 12.5px; font-weight: 500; color: var(--g-text-2); }
.sf-role.on { border-color: var(--g-line-strong); background: linear-gradient(180deg, rgba(244, 191, 92, 0.18), rgba(168, 114, 46, 0.07)); box-shadow: 0 0 20px rgba(229, 172, 69, 0.14); }
.sf-role.on b { color: var(--g-gold-light); }
.sf-role:disabled { cursor: default; opacity: 0.65; }
.sf-title { margin-bottom: 10px; font-size: 15px; font-weight: 700; color: var(--g-text); }
.sf-split { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }
.sf-brands { display: flex; flex-direction: column; gap: 4px; max-height: 330px; overflow-y: auto; }
.sf-brand { flex: none; justify-content: flex-start; gap: 10px; padding: 9px 10px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--g-text); text-align: left; }
.sf-brand:hover { background: rgba(255, 255, 255, 0.04); }
.sf-brand.on { border-color: var(--g-line-strong); background: rgba(229, 172, 69, 0.1); }
.sf-mark { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgba(229, 172, 69, 0.4); color: var(--g-gold-light); font-size: 15px; font-weight: 700; }
.sf-mark .brand-logo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.sf-mark .brand-logo.cut { border-radius: 0; object-fit: contain; }
.sf-brand-text { display: flex; flex-direction: column; min-width: 0; }
.sf-brand-text b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.sf-brand-text small { font-size: 12px; font-weight: 500; color: var(--g-gold-bright); }
.sf-brand-text small.off { color: var(--g-muted); }
.sf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sf-chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.11); background: #08090b; color: var(--g-text-2); font-size: 13px; font-weight: 600; }
.sf-chip:hover { color: var(--g-text); border-color: var(--g-line-strong); }
.sf-chip.on { border-color: transparent; background: linear-gradient(180deg, #ffd785, #e5ac45 65%, #a8722e); color: var(--g-on-gold); }
.sf-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.sf-sec { padding: 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.09); background: #0b0c0e; }
.sf-sec h5 { margin-bottom: 6px; font-size: 13px; color: var(--g-gold-light); }
.modal.modal-gold .modal-body label.sf-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; margin: 0; cursor: pointer; color: var(--g-text); font-size: 13.5px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.modal.modal-gold .modal-body .sf-switch input { position: absolute; right: 0; width: 40px; height: 24px; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.sf-switch i { position: relative; width: 40px; height: 24px; flex: none; border-radius: 999px; background: #2a2c33; pointer-events: none; transition: background 0.15s; }
.sf-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #9aa0aa; transition: left 0.15s, background 0.15s; }
.sf-switch input:checked + i { background: linear-gradient(180deg, #ffd785, #e5ac45 65%, #a8722e); }
.sf-switch input:checked + i::after { left: 19px; background: var(--g-on-gold); }
.sf-switch input:focus-visible + i { outline: 2px solid var(--g-gold-light); outline-offset: 2px; }
.modal.modal-gold .modal-body label.sf-active { max-width: 230px; margin-bottom: 16px; }
.sf-note { margin-top: 10px; font-size: 12.5px; color: var(--g-text-2); }
.staff-state { display: inline-flex; align-items: center; gap: 7px; }
.staff-state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--g-muted, #8a909b); }
.staff-state.on::before { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.6); }

/* ---------- Удаление бренда ---------- */
.del-text { margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: var(--g-text-2); }
.del-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.del-counts div { padding: 10px; border-radius: 11px; border: 1px solid rgba(245, 87, 108, 0.22); background: rgba(245, 87, 108, 0.07); }
.del-counts b { display: block; font-size: 20px; color: var(--g-text); }
.del-counts span { display: block; font-size: 11.5px; line-height: 1.3; color: var(--g-text-2); }
.modal.modal-gold .modal-footer .del-go { background: #d93a52; border-color: #d93a52; color: #fff; }
.modal.modal-gold .modal-footer .del-go:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 760px) {
  .sf-fields, .sf-roles, .sf-split { grid-template-columns: minmax(0, 1fr); }
  .sf-brands { flex-direction: row; max-height: none; overflow-x: auto; }
  .sf-brand { max-width: 220px; }
  .del-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Шапка внутри бренда (все разделы) ---------- */
#app-screen { --header-height: 64px; }
#app-screen .header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 64px;
  padding: 0 24px;
  gap: 18px;
  background: rgba(4, 4, 5, 0.94);
  border-bottom: 1px solid rgba(229, 172, 69, 0.18);
  box-shadow: none;
  color: #f1f1f2;
  font-family: Inter, Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
}
#app-screen .header-left { gap: 20px; min-width: 0; }
#app-screen .logo { gap: 10px; color: #f4bf5c; white-space: nowrap; }
#app-screen .logo-icon { width: 21px; height: 21px; margin: 0; background: none; box-shadow: none; }
#app-screen .logo-icon svg { width: 21px; height: 21px; color: #f4bf5c; }
#app-screen .logo span:not(.logo-icon) { background: none; -webkit-text-fill-color: #f4bf5c; font-family: Cinzel, Georgia, serif; font-size: 16px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
#app-screen .brand-chip { height: 40px; max-width: 260px; padding: 0 14px 0 4px; gap: 9px; background: #0e0f12; border: 1px solid rgba(229, 172, 69, 0.22); box-shadow: none; color: #f1f1f2; font-size: 14px; font-weight: 600; }
#app-screen .brand-chip:hover { transform: none; filter: none; border-color: rgba(244, 191, 92, 0.55); }
#app-screen .brand-chip-emoji { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid #f4bf5c; background: #0a0b0d; color: #ffd785; font-family: Cinzel, Georgia, serif; font-weight: 700; }
#app-screen .brand-chip-emoji:has(.brand-logo) { width: 32px; height: 32px; }
#app-screen .brand-chip-caret { opacity: 1; color: #8a909b; font-size: 12px; font-weight: 500; }
#app-screen .brand-chip-badge { box-shadow: 0 0 0 2px #040405; }
#app-screen .tabs { gap: 4px; padding: 0; background: none; border: 0; border-radius: 0; }
#app-screen .tabs .tab { position: relative; padding: 8px 13px; border-radius: 9px; background: none; box-shadow: none; color: #a1a6af; font-size: 14px; font-weight: 500; }
#app-screen .tabs .tab:hover { background: rgba(255, 255, 255, 0.05); color: #f1f1f2; }
#app-screen .tabs .tab.active { color: #ffd785; }
#app-screen .tabs .tab.active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -13px; height: 2px; border-radius: 2px; background: #f4bf5c; }
#app-screen .header-right { gap: 8px; }
#app-screen .hd-out { height: 38px; padding: 0 14px; gap: 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.09); background: none; color: #a1a6af; font-size: 14px; font-weight: 500; }
#app-screen .hd-out:hover { color: #f1f1f2; border-color: rgba(229, 172, 69, 0.4); }
#app-screen .hd-out svg { width: 16px; height: 16px; }
#app-screen .mobile-nav-toggle { width: 40px; height: 38px; padding: 0; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.09); background: none; color: #f1f1f2; }
#app-screen .mobile-nav-menu { top: 64px; z-index: 199; background: #0b0c0e; border-bottom: 1px solid rgba(229, 172, 69, 0.22); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45); font-family: Inter, Manrope, system-ui, sans-serif; }
#app-screen .mobile-nav-menu .tab { border-radius: 10px; background: none; box-shadow: none; color: #a1a6af; font-weight: 500; }
#app-screen .mobile-nav-menu .tab.active { background: rgba(229, 172, 69, 0.1); color: #ffd785; }
#app-screen .header button:focus-visible, #app-screen .header .tab:focus-visible { outline: 2px solid #ffd785; outline-offset: 2px; }

@media (max-width: 1160px) {
  #app-screen .tabs { display: none; }
  #app-screen .mobile-nav-toggle { display: grid; place-items: center; }
}
@media (min-width: 1161px) {
  #app-screen .mobile-nav-menu.open { display: none; }
}
@media (max-width: 760px) {
  #app-screen .header { padding: 0 12px; gap: 8px; }
  #app-screen .header-left { gap: 12px; }
  #app-screen .logo span:not(.logo-icon), #app-screen .brand-chip-caret, #app-screen .hd-out span { display: none; }
  #app-screen .brand-chip { max-width: 190px; }
  #app-screen .hd-out { width: 40px; padding: 0; }
}

/* ---------- Раздел «Аккаунты» ---------- */
body.gold-section #app-screen { background: #040405; }
body.gold-section .app-blob { display: none; }
body.gold-section .modal-overlay { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
body.gold-section ::-webkit-scrollbar-thumb { background: rgba(229, 172, 69, 0.25); }
#tab-accounts { max-width: 1184px; margin: 0 auto; font-variant-numeric: tabular-nums; }
#tab-accounts button:focus-visible, .ac-menu button:focus-visible { outline: 2px solid #ffd785; outline-offset: -2px; }
.ac-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.ac-top h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.ac-sum { min-height: 22px; margin-top: 6px; font-size: 14px; color: #a1a6af; }
.ac-sum .ok { color: #34d399; }
.ac-sum .warn { color: #ffb938; }
.ac-spam { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; color: #8a909b; font-size: 13px; }
.ac-spam:empty { display: none; }
.ac-spam b { color: #c9ccd2; font-weight: 600; }
.ac-spam b.ok { color: #34d399; }
.ac-reply { flex-basis: 100%; color: #8a909b; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ac-top-acts { display: flex; gap: 8px; }
.ac-btn { height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid rgba(229, 172, 69, 0.22); background: rgba(255, 255, 255, 0.045); color: #f1f1f2; font-size: 13.5px; font-weight: 600; }
.ac-btn:hover { border-color: rgba(244, 191, 92, 0.55); color: #ffd785; }
.ac-btn-gold, .ac-btn-gold:hover { height: 42px; border: 0; color: #17130d; font-weight: 700; background: linear-gradient(180deg, #ffd785 0%, #f4bf5c 35%, #e5ac45 70%, #a8722e 100%); box-shadow: 0 8px 22px rgba(229, 172, 69, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.ac-btn-gold:hover { color: #17130d; filter: brightness(1.07); }
.ac-more { position: relative; }
.ac-dots { width: 42px; height: 42px; flex: none; padding: 0; border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.08); background: none; color: #a1a6af; font-size: 18px; letter-spacing: 1px; }
.ac-dots:hover { border-color: rgba(229, 172, 69, 0.3); color: #ffd785; }
.ac-dots-sm { width: 36px; height: 36px; border-radius: 10px; }

.ac-list { border-radius: 18px; border: 1px solid rgba(229, 172, 69, 0.22); background: linear-gradient(180deg, #121316, #0b0c0e); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); overflow: hidden; }
.ac-row + .ac-row { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.ac-head { display: flex; align-items: center; gap: 6px; padding-right: 16px; }
.ac-head:hover { background: rgba(255, 255, 255, 0.022); }
.ac-row.open .ac-head { background: rgba(229, 172, 69, 0.045); }
.ac-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(220px, 1.35fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(120px, 0.7fr); gap: 18px; align-items: center; padding: 14px 8px 14px 20px; border-radius: 0; background: none; color: #f1f1f2; font-size: 14px; font-weight: 400; line-height: 1.4; text-align: left; }
.ac-who { display: flex; align-items: center; gap: 13px; min-width: 0; }
.ac-ava { position: relative; width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(244, 191, 92, 0.6); background: #0a0b0d; color: #ffd785; font-size: 16px; font-weight: 700; }
.ac-ava::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid #111215; background: #34d399; }
.ac-ava.warn::after { background: #ffb938; }
.ac-ava.err { border-color: rgba(245, 87, 108, 0.55); color: #ffb3bd; }
.ac-ava.err::after { background: #f5576c; }
.ac-ava.off::after { background: #5b5f67; }
.ac-id { display: flex; flex-direction: column; min-width: 0; }
.ac-id b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; font-weight: 600; }
.ac-id small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: #8a909b; }
.ac-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ac-cell { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.ac-cell > span:not(.ac-chip) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-cell small { font-size: 12px; color: #8a909b; }
.ac-state { align-items: flex-start; gap: 5px; }
/* «На карантине до 5 декабря, 14:00» не помещается в одну строку */
.ac-cell.ac-state > span.ac-st { white-space: normal; line-height: 1.35; }
.ac-row .muted { color: #8a909b; }
.ac-row .err { color: #ff8c9b; }
.ac-st { font-size: 13px; font-weight: 600; }
.ac-st.ok { color: #34d399; }
.ac-st.warn { color: #ffb938; }
.ac-st.err { color: #f5576c; }
.ac-st.off { color: #a1a6af; }
.ac-st-plain.warn { color: #ffb938; font-weight: 600; }
.ac-st-plain.muted { color: #8a909b; }
.ac-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: #f4bf5c; color: #17130d; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ac-link { min-height: 28px; padding: 0 4px; border-radius: 6px; background: none; color: #f4bf5c; font-size: 13.5px; font-weight: 600; }
.ac-link:hover { color: #ffd785; text-decoration: underline; text-underline-offset: 3px; }

.ac-details { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px; padding: 6px 20px 18px 75px; background: rgba(229, 172, 69, 0.018); }
.ac-details[hidden] { display: none; }
.ac-problem { flex-basis: 100%; padding: 10px 13px; border-radius: 11px; font-size: 13.5px; line-height: 1.5; border: 1px solid rgba(255, 255, 255, 0.1); color: #c9ccd2; }
.ac-problem.warn { border-color: rgba(255, 185, 56, 0.25); background: rgba(255, 185, 56, 0.08); color: #ffd27a; }
.ac-problem.err { border-color: rgba(245, 87, 108, 0.25); background: rgba(245, 87, 108, 0.09); color: #ffb3bd; }
.ac-facts { display: flex; flex-direction: column; gap: 6px; min-width: 280px; font-size: 13.5px; }
.ac-facts > div { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.ac-facts > div.ac-narrow { display: none; }
.ac-facts dt { width: 92px; flex: none; color: #8a909b; }
.ac-facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.ac-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

.ac-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 44px 20px; border-radius: 18px; border: 1px dashed rgba(229, 172, 69, 0.3); color: #a1a6af; text-align: center; }
.ac-skel div { height: 72px; position: relative; overflow: hidden; }
.ac-skel div + div { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.ac-skel div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(229, 172, 69, 0.07), transparent); animation: bp-shimmer 1.3s infinite; }

.ac-menu { position: absolute; z-index: 400; width: 236px; padding: 6px; border-radius: 13px; border: 1px solid rgba(229, 172, 69, 0.25); background: #101115; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65); font-family: Inter, Manrope, system-ui, sans-serif; }
.ac-more .ac-menu { right: 0; top: calc(100% + 6px); }
.ac-menu button { width: 100%; justify-content: flex-start; gap: 10px; min-height: 38px; padding: 0 11px; border-radius: 8px; background: none; color: #f1f1f2; font-size: 14px; font-weight: 500; text-align: left; }
.ac-menu button:hover { background: rgba(229, 172, 69, 0.1); color: #ffd785; }
.ac-menu button:disabled { opacity: 0.5; cursor: default; }
.ac-menu svg { width: 16px; height: 16px; flex: none; color: #f4bf5c; }
.ac-menu hr { margin: 5px 4px; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.ac-menu button.danger, .ac-menu button.danger svg { color: #ff8c9b; }
.ac-menu button.danger:hover { background: rgba(245, 87, 108, 0.12); color: #ffb3bd; }

.ac-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1100; max-width: min(440px, calc(100vw - 28px)); padding: 12px 18px; border-radius: 13px; border: 1px solid rgba(229, 172, 69, 0.4); background: #121316; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); color: #f1f1f2; font-family: Inter, Manrope, system-ui, sans-serif; font-size: 14px; font-weight: 500; line-height: 1.45; opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s; }
.ac-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.ac-toast.ok { border-color: rgba(52, 211, 153, 0.5); }
.ac-toast.err { border-color: rgba(245, 87, 108, 0.6); color: #ffb3bd; }

/* Окна раздела */
.modal.modal-gold.modal-ac { max-width: 440px; }
.ac-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.ac-steps i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.09); }
.ac-steps i.on { background: #f4bf5c; }
.ac-lead { margin-bottom: 16px; font-size: 13.5px; line-height: 1.5; color: #a1a6af; overflow-wrap: anywhere; }
.modal.modal-gold .modal-body input.ac-code { text-align: center; letter-spacing: 0.4em; font-size: 22px; font-weight: 600; }
.ac-hint { margin-top: -6px; font-size: 12.5px; color: #8a909b; }
.ac-err { margin-top: 10px; font-size: 13.5px; color: #ff8c9b; }
.ac-err:empty { display: none; }
.modal.modal-gold .modal-body label.sf-switch.ac-switch { gap: 14px; margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.025); }
.modal.modal-gold .modal-body .sf-switch.ac-switch input { right: 14px; }
.ac-switch b { display: block; font-size: 14px; font-weight: 600; }
.ac-switch small { display: block; font-size: 12.5px; font-weight: 400; color: #8a909b; }
.ac-adv summary { width: max-content; padding: 4px 0; cursor: pointer; font-size: 13px; color: #a1a6af; }
.ac-adv summary:hover { color: #ffd785; }
.ac-adv[open] summary { margin-bottom: 10px; }

@media (max-width: 900px) {
  .ac-main { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 13px 4px 13px 14px; }
  .ac-main .ac-wide { display: none; }
  .ac-state { align-items: flex-end; text-align: right; }
  .ac-head { padding-right: 10px; }
  .ac-details { padding: 6px 14px 16px; }
  .ac-facts { min-width: 100%; }
  .ac-facts > div.ac-narrow { display: flex; }
  .ac-acts { margin-left: 0; width: 100%; }
  .ac-acts .ac-btn { flex: 1 1 140px; height: 44px; }
}
@media (max-width: 560px) {
  .ac-top h1 { font-size: 24px; }
  .ac-top-acts { width: 100%; }
  .ac-top-acts .ac-btn-gold { flex: 1; height: 44px; }
  .ac-dots, .ac-dots-sm { width: 44px; height: 44px; }
  .ac-ava { width: 38px; height: 38px; font-size: 15px; }
  .ac-who { gap: 11px; }
  .ac-state { max-width: 112px; }
  .ac-state > span:not(.ac-chip) { white-space: normal; line-height: 1.3; }
  .ac-id small { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-skel div::after { animation: none; }
  .ac-toast { transition: none; }
}