/* Шапка страницы, навигация и элементы управления. Адаптивные правила расположены рядом с компонентами. */
.topbar { position: relative; height: 56px; padding: 0px max(22px, -640px + 50vw); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: #14080a; color: #f2ece8; }
.brand { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; font-weight: 800; letter-spacing: 0.28em; font-size: 15px; color: #f2ece8; pointer-events: none; }
.demo-link { color: #c9b0b6; text-decoration: none; letter-spacing: 0.08em; font-size: 13px; }
.demo-link:hover { color: #f2ece8; }
.brand span { color: rgb(237, 86, 86); margin-left: 5px; }
.topmeta { position: absolute; top: 0; right: 8px; height: 100%; display: flex; gap: 8px; align-items: center; margin: 0; color: var(--muted); font-size: 12px; letter-spacing: 0.12em; }
.pos-score { color: #c9b0b6; font-size: 12px; letter-spacing: 0.04em; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: rgba(54, 201, 119, 0.533) 0px 0px 10px; }
.live-dot.offline { background: #f45d5d; box-shadow: 0 0 10px rgba(244, 93, 93, 0.7); }
.shell { max-width: 1280px; margin: 0px auto; padding: 32px 22px 70px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: rgb(230, 92, 92); font-weight: 800; }
.page-heading h1 { font-size: 30px; margin: 5px 0px 4px; }
.counter { display: flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid var(--line); padding: 12px 17px; border-radius: 13px; color: var(--muted); }
.counter b { font-size: 24px; color: rgb(255, 255, 255); }
.filters { display: flex; gap: 8px; margin-bottom: 18px; }
.filter, .back { background: #1a0c0e; color: #9a8a88; border: 1px solid #3a181c; border-radius: 8px; padding: 9px 14px; cursor: pointer; }
.filter.active { background: #32161a; color: #f2ece8; border-color: #4a282c; }
.filter-gear { display: inline-flex; align-items: center; justify-content: center; width: 38px; padding: 8px; }
.admin-only[hidden] { display: none !important; }
.admin-login { display: flex; gap: 6px; align-items: center; }
.admin-login[hidden] { display: none; }
.admin-login input { width: 128px; background: #1a0c0e; color: #f2ece8; border: 1px solid #3a181c; border-radius: 8px; padding: 9px 12px; }
.admin-login input:focus { outline: 1px solid #f5d76e; border-color: #f5d76e; }
.admin-login button { background: #32161a; color: #f2ece8; border: 1px solid #4a282c; border-radius: 8px; padding: 9px 14px; cursor: pointer; }
.filter-gear svg { width: 16px; height: 16px; display: block; }
.train-panel { max-width: 640px; margin-top: 4px; padding: 18px; border: 1px solid #3a181c; border-radius: 12px; background: #16080c; }
.train-example { margin: 0 0 14px; color: #9a8a88; font-size: 14px; word-break: break-all; }
.train-form { display: flex; gap: 8px; }
.train-form input { flex: 1; min-width: 0; background: #1a0c0e; color: #f2ece8; border: 1px solid #3a181c; border-radius: 8px; padding: 9px 12px; }
.train-form input:focus { outline: 1px solid #f5d76e; border-color: #f5d76e; }
.train-form button { background: #32161a; color: #f2ece8; border: 1px solid #4a282c; border-radius: 8px; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.train-form button:disabled { opacity: 0.6; cursor: default; }
.train-status { min-height: 1.3em; margin: 12px 0 0; }
.train-status.is-error { color: #f45d5d; }
.train-status.is-ok { color: #36c977; }
.wallet-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid #3a181c; }
.wallet-label { margin: 0 0 6px; color: #f2ece8; font-size: 14px; font-weight: 750; }
.wallet-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wallet-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 1px solid #3a181c; border-radius: 8px; background: #1a0c0e; color: #f2ece8; font-size: 13px; font-variant-numeric: tabular-nums; }
.wallet-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-list button { border: 0; background: transparent; color: #c9b0b6; cursor: pointer; font: inherit; font-size: 12px; }
.wallet-list button:hover { color: #f45d5d; }
.wallet-list .wallet-empty { color: #9a8a88; justify-content: flex-start; }
@media (max-width: 620px) {
  .train-form { flex-direction: column; }
}
.back { margin-bottom: 18px; }
@media (max-width: 900px) {
  .page-heading h1 { font-size: 24px; }
}
@media (max-width: 500px) {
  .shell { padding: 22px 12px; }
  .topbar { padding: 0px 12px; }
  .topmeta { font-size: 0px; }
  .topmeta #sync { font-size: 10px; }
  .filters { overflow: auto; }
  .filter { white-space: nowrap; }
}
.mode-label { color: var(--muted); font-size: 12px; }
.mode-select { background: rgb(27, 34, 44); color: rgb(237, 242, 248); border: 1px solid var(--line); padding: 7px 10px; border-radius: 8px; max-width: 170px; }
.mode-select:focus { outline: rgb(100, 116, 139) solid 1px; }
@media (max-width: 650px) {
  .mode-label { display: none; }
  .mode-select { max-width: 130px; font-size: 11px; }
  .topmeta { gap: 6px; }
}
.live-dot.unhealthy { background: rgb(232, 182, 92); box-shadow: none; }
.match-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.match-navigation .filters { margin-bottom: 0px; flex-wrap: wrap; overflow: visible; }
.match-tools { display: flex; align-items: center; gap: 14px; }
.layout-switch { display: flex; align-items: center; gap: 6px; }
.layout-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #3a181c; border-radius: 8px; background: #1a0c0e; color: #9a8a88; cursor: pointer; }
.layout-btn svg { width: 18px; height: 18px; display: block; }
.layout-btn:hover { border-color: #4a282c; background: #221014; color: #f2ece8; }
.layout-btn.is-active { background: #32161a; color: #f5d76e; border-color: #8a6a32; }
.match-total { display: flex; gap: 6px; align-items: center; color: var(--muted); white-space: nowrap; }
.match-total b { color: var(--text); }
@media (max-width: 620px) {
  .shell { padding: 12px 8px 24px; }
  .topbar { height: 48px; padding: 0px 10px; gap: 10px; }
  .brand { font-size: 15px; }
  .topmeta { min-width: 0px; }
  .topmeta #sync { font-size: 9px; }
  .back { margin-bottom: 10px; min-height: 44px; }
}
