/* Telegram Mini App — native chat-list SPA */

html.tg-app,
html.tg-app body {
  margin: 0;
  padding: 0;
  background: var(--tg-bg, #ffffff);
  color: var(--tg-text, #000000);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

html.tg-app #web-shell {
  display: none !important;
}

/* Only show the active shell. `display:flex` must not override [hidden],
   otherwise Home v2 leaves the legacy catalog stuck on "Загрузка каталога…". */
html.tg-app #tg-shell:not([hidden]) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100vh;
}

html.tg-app #tg-shell[hidden],
html.tg-app #hub-shell[hidden] {
  display: none !important;
}

html.tg-app #hub-shell:not([hidden]) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100vh;
}

html.tg-app .tg-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: var(--tg-header-bg, var(--tg-bg, #ffffff));
  border-bottom: 0.5px solid var(--tg-separator, rgba(0, 0, 0, 0.08));
}

html.tg-app .tg-topbar-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

html.tg-app .tg-topbar-actions {
  display: flex;
  gap: 4px;
}

html.tg-app .tg-icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 20px;
  background: transparent;
  color: var(--tg-link, #2481cc);
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

html.tg-app .tg-icon-btn:active {
  transform: scale(0.94);
  background: var(--tg-secondary-bg, rgba(0, 0, 0, 0.04));
}

html.tg-app .tg-search-wrap {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 52px);
  z-index: 9;
  padding: 8px 16px 10px;
  background: var(--tg-bg, #ffffff);
}

html.tg-app .tg-search {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 10px;
  padding: 10px 12px 10px 36px;
  font-size: 16px;
  background: var(--tg-secondary-bg, #f4f4f5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 12px center no-repeat;
  color: var(--tg-text, #000);
}

html.tg-app .tg-search::placeholder {
  color: var(--tg-hint, #8e8e93);
}

html.tg-app .tg-catalog {
  flex: 1;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
}

html.tg-app .tg-section-header {
  padding: 18px 16px 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--tg-section-header, var(--tg-hint, #8e8e93));
  background: var(--tg-section-bg, var(--tg-bg, #ffffff));
}

html.tg-app .tg-section-sep {
  height: 0.5px;
  background: var(--tg-separator, rgba(0, 0, 0, 0.08));
  margin: 0 16px;
}

html.tg-app .tg-row {
  position: relative;
  overflow: hidden;
  background: var(--tg-bg, #ffffff);
}

html.tg-app .tg-row::before,
html.tg-app .tg-row::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

html.tg-app .tg-row::before {
  left: 0;
  background: #2481cc;
  content: "TG";
}

html.tg-app .tg-row::after {
  right: 0;
  background: #333;
  content: "GH";
}

html.tg-app .tg-row-swipe-left::after,
html.tg-app .tg-row-swipe-right::before {
  opacity: 1;
}

html.tg-app .tg-row-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--tg-bg, #ffffff);
  transition: transform 0.2s ease-out;
  will-change: transform;
}

html.tg-app .tg-row-inner:active {
  background: var(--tg-secondary-bg, rgba(0, 0, 0, 0.04));
}

@media (prefers-reduced-motion: no-preference) {
  html.tg-app .tg-row-inner {
    transition: transform 0.2s ease-out, background 0.15s ease;
  }

  html.tg-app .tg-row-inner:active {
    transform: scale(0.98);
  }
}

html.tg-app .tg-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--tg-secondary-bg, #f0f0f0);
  color: var(--tg-accent, var(--tg-link, #2481cc));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
}

html.tg-app .tg-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Уже круглые логотипы (VPN и т.п.) — без зума/обрезания кольца */
html.tg-app .tg-icon-img[src$=".png"] {
  object-fit: contain;
  background: transparent;
}

html.tg-app .tg-icon-fallback {
  line-height: 1;
}

html.tg-app .tg-icon:has(.tg-icon-img) .tg-icon-fallback {
  display: none;
}

html.tg-app .tg-row-body {
  flex: 1;
  min-width: 0;
}

html.tg-app .tg-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

html.tg-app .tg-row-title {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.tg-app .tg-row-status {
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

html.tg-app .tg-status-online {
  color: #34c759;
}

html.tg-app .tg-status-partial {
  color: #ff9500;
}

html.tg-app .tg-status-offline {
  color: var(--tg-destructive, #ff3b30);
}

html.tg-app .tg-status-unknown {
  color: var(--tg-hint, #8e8e93);
}

html.tg-app .tg-row-username {
  font-size: 14px;
  color: var(--tg-subtitle, var(--tg-hint, #8e8e93));
  margin-top: 1px;
}

html.tg-app .tg-row-desc {
  font-size: 14px;
  color: var(--tg-subtitle, var(--tg-hint, #8e8e93));
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.tg-app .tg-chevron {
  color: var(--tg-hint, #c7c7cc);
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 4px;
}

html.tg-app .tg-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--tg-hint, #8e8e93);
  font-size: 15px;
}

html.tg-app .tg-loading {
  padding: 24px 16px;
  color: var(--tg-hint, #8e8e93);
  font-size: 15px;
}

/* Bottom sheet */
#tg-sheet-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

#tg-sheet-root.tg-sheet-open {
  pointer-events: auto;
}

.tg-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.25s ease-out;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.tg-sheet-open .tg-sheet-overlay {
  opacity: 1;
}

.tg-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92dvh;
  background: var(--tg-bg, #ffffff);
  border-radius: 14px 14px 0 0;
  transform: translateY(100%);
  transition: transform 0.25s ease-out;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tg-sheet-open .tg-sheet-panel {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .tg-sheet-overlay,
  .tg-sheet-panel,
  html.tg-app .tg-row-inner {
    transition: none !important;
  }
}

.tg-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--tg-separator, rgba(0, 0, 0, 0.15));
  margin: 8px auto 4px;
  flex-shrink: 0;
}

.tg-sheet-content {
  overflow-y: auto;
  padding: 8px 16px 24px;
  -webkit-overflow-scrolling: touch;
}

.tg-sheet-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 0 16px;
}

.tg-sheet-hero .tg-icon {
  width: 72px;
  height: 72px;
  font-size: 18px;
  margin-bottom: 12px;
}

.tg-sheet-hero .tg-icon-img {
  width: 40px;
  height: 40px;
}

.tg-sheet-title {
  font-size: 20px;
  font-weight: 600;
}

.tg-sheet-title-block {
  padding: 8px 0 16px;
}

.tg-sheet-username {
  font-size: 15px;
  color: var(--tg-subtitle, var(--tg-hint, #8e8e93));
  margin-top: 4px;
}

.tg-sheet-desc {
  font-size: 15px;
  line-height: 1.45;
  color: var(--tg-text, #000);
  margin: 0 0 16px;
}

.tg-sheet-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-section-header, var(--tg-hint, #8e8e93));
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tg-sheet-commands {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.tg-sheet-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--tg-secondary-bg, #f4f4f5);
  margin-bottom: 16px;
}

.tg-sheet-status-big {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  margin-top: 8px;
}

.tg-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.tg-sheet-actions {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tg-secondary-bg, #f4f4f5);
}

.tg-sheet-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 0.5px solid var(--tg-separator, rgba(0, 0, 0, 0.08));
  background: transparent;
  color: var(--tg-link, #2481cc);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.tg-sheet-action:last-child {
  border-bottom: none;
}

.tg-sheet-action:active {
  background: rgba(0, 0, 0, 0.04);
}

.tg-sheet-action-destructive {
  color: var(--tg-destructive, #ff3b30);
}

.tg-status-dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  margin: 0;
  font-size: 15px;
}

.tg-status-dl dt {
  color: var(--tg-subtitle, var(--tg-hint, #8e8e93));
  margin: 0;
}

.tg-status-dl dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
}

.tg-status-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tg-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 0.5px solid var(--tg-separator, rgba(0, 0, 0, 0.08));
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.tg-status-row .tg-icon {
  width: 40px;
  height: 40px;
  font-size: 12px;
}

.tg-status-row-text {
  flex: 1;
  min-width: 0;
}

.tg-sheet-meta {
  margin-top: 24px;
  font-size: 13px;
  color: var(--tg-hint, #8e8e93);
  text-align: center;
}

/* skopp.VPN screen */
.tg-vpn-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--tg-bg, #ffffff);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

.tg-vpn-root[hidden] {
  display: none !important;
}

.tg-vpn-root.tg-vpn-open {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

.tg-vpn-panel,
.tg-vpn-content {
  height: 100%;
}

.tg-vpn-content {
  overflow-y: auto;
  padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.tg-vpn-head {
  margin-bottom: 8px;
  padding: 0 2px 8px;
  border-bottom: 0.5px solid var(--tg-separator, rgba(0, 0, 0, 0.08));
}

.tg-vpn-head-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.tg-vpn-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tg-vpn-summary {
  margin-top: 4px;
  font-size: 12px;
  color: var(--tg-hint, #8e8e93);
  font-variant-numeric: tabular-nums;
}

.tg-vpn-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--tg-hint, #8e8e93);
}

.tg-vpn-refresh {
  border: none;
  background: none;
  color: var(--tg-link, #2481cc);
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.tg-vpn-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tg-vpn-row {
  padding: 8px 2px;
  border-bottom: 0.5px solid var(--tg-separator, rgba(0, 0, 0, 0.08));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tg-vpn-row:active {
  opacity: 0.72;
}

.tg-vpn-row-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tg-vpn-mark {
  flex-shrink: 0;
  width: 1.15em;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.tg-vpn-warning .tg-vpn-name {
  color: #ff9f0a;
}

.tg-vpn-edit {
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--tg-secondary-bg, rgba(0, 0, 0, 0.06));
  color: var(--tg-link, #2481cc);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tg-vpn-editor {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tg-vpn-editor label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--tg-hint, #8e8e93);
}

.tg-vpn-editor input {
  border: 0.5px solid var(--tg-separator, rgba(0, 0, 0, 0.12));
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--tg-text, #000);
  background: var(--tg-bg, #fff);
}

.tg-vpn-editor-actions {
  display: flex;
  gap: 8px;
}

.tg-vpn-editor-actions button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--tg-button, #2481cc);
  color: var(--tg-button-text, #fff);
}

.tg-vpn-editor-actions button:last-child {
  background: var(--tg-secondary-bg, rgba(0, 0, 0, 0.08));
  color: var(--tg-text, #000);
}

.tg-vpn-row-text {
  flex: 1;
  min-width: 0;
}

.tg-vpn-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.tg-vpn-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-vpn-ago {
  flex-shrink: 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--tg-hint, #8e8e93);
}

.tg-vpn-online .tg-vpn-ago {
  color: #34c759;
}

.tg-vpn-recent .tg-vpn-ago {
  color: #ff9f0a;
}

.tg-vpn-stale .tg-vpn-ago {
  color: #ff3b30;
}

.tg-vpn-sub {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--tg-hint, #8e8e93);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-vpn-details {
  margin: 6px 0 2px 18px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--tg-secondary-bg, rgba(0, 0, 0, 0.04));
}

.tg-vpn-details[hidden] {
  display: none !important;
}

.tg-vpn-detail-line {
  font-size: 12px;
  line-height: 1.4;
  color: var(--tg-hint, #8e8e93);
  font-variant-numeric: tabular-nums;
}

.tg-vpn-detail-line + .tg-vpn-detail-line {
  margin-top: 2px;
}

.tg-vpn-note {
  font-size: 12px;
  color: var(--tg-hint, #8e8e93);
  margin: 8px 0;
}

.tg-vpn-sub {
  font-size: 12px;
  color: var(--tg-hint, #8e8e93);
}

.tg-vpn-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}

.tg-vpn-filter {
  border: 1px solid rgba(127, 127, 127, 0.35);
  background: transparent;
  color: inherit;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
}

.tg-vpn-filter.is-active {
  background: rgba(40, 140, 255, 0.16);
  border-color: rgba(40, 140, 255, 0.45);
}

.tg-vpn-warn {
  margin-top: 6px;
  color: #c45c00;
  font-size: 12px;
}

.tg-vpn-state {
  padding: 16px 4px;
  font-size: 14px;
}

.tg-vpn-row-error {
  border-color: rgba(196, 92, 0, 0.45);
}

/* ===== skopp.hub Home v2 ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hub-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  background: var(--tg-bg, #e8eef2);
  color: var(--tg-text, #1c1c1e);
}

.hub-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px;
}

.hub-brand {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
}

.hub-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--tg-hint, #6b7280);
}

.hub-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-header-status {
  font-size: 12px;
  white-space: nowrap;
}

.hub-switch-row {
  margin: 0 0 12px;
}

.hub-text-link {
  color: var(--tg-link, #2563eb);
  font: 600 13px/1.3 "Manrope", sans-serif;
  text-decoration: none;
}

.hub-text-link:hover,
.hub-text-link:focus-visible {
  text-decoration: underline;
}

.tg-open-home {
  align-self: center;
  margin-right: 4px;
  white-space: nowrap;
}

.hub-header-status.is-ok { color: #1f7a4c; }
.hub-header-status.is-attention { color: #a15c00; }

.hub-search-wrap {
  padding: 0 16px 12px;
}

.hub-section-root {
  flex: 1;
  padding: 0 16px 24px;
}

.hub-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(248, 250, 252, 0.96);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.hub-tab {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--tg-hint, #6b7280);
  font: 600 12px/1.2 "Manrope", sans-serif;
  cursor: pointer;
}

.hub-tab.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.hub-block {
  margin-bottom: 22px;
}

.hub-block h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 720px) {
  .hub-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hub-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  cursor: pointer;
  text-align: left;
}

.hub-card:focus-visible,
.hub-tab:focus-visible,
.hub-filter-chip:focus-visible,
.hub-card-action:focus-visible,
.hub-fav-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.hub-card-icon img,
.hub-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #eef2ff;
}

.hub-card-body { min-width: 0; flex: 1; }
.hub-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hub-card-title {
  margin: 0;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-card-meta,
.hub-card-subtitle,
.hub-card-desc {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--tg-hint, #6b7280);
}
.hub-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
}
.hub-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.hub-status-online { color: #1f7a4c; }
.hub-status-attention,
.hub-status-degraded { color: #a15c00; }
.hub-status-offline,
.hub-status-disabled { color: #b42318; }
.hub-status-planned,
.hub-status-unknown { color: #64748b; }

.hub-card-actions { margin-top: 8px; }
.hub-card-action,
.hub-filter-chip,
.hub-detail-link {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 0;
  background: #2563eb;
  color: #fff;
  font: 600 13px/1 "Manrope", sans-serif;
  cursor: pointer;
}
.hub-card-action.is-disabled,
.hub-detail-link.is-disabled {
  background: #cbd5e1;
  color: #475569;
  cursor: not-allowed;
}
.hub-fav-btn {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
}
.hub-fav-btn.is-active { color: #ca8a04; }

.hub-health {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 600;
}
.hub-health-meta {
  margin-left: auto;
  font-weight: 500;
  color: var(--tg-hint, #6b7280);
}
.hub-warning {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
}
.hub-empty {
  color: var(--tg-hint, #6b7280);
  font-size: 14px;
}
.hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.hub-filter-chip {
  background: #e2e8f0;
  color: #0f172a;
}
.hub-filter-chip.is-active {
  background: #1d4ed8;
  color: #fff;
}
.hub-tools-list {
  display: grid;
  gap: 10px;
}
.hub-tool-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
}
.hub-tool-copy {
  display: grid;
  gap: 4px;
}
.hub-tool-copy span,
.hub-event-meta {
  color: var(--tg-hint, #6b7280);
  font-size: 12px;
}
.hub-event-list,
.hub-events-feed,
.hub-detail-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.hub-event-list li,
.hub-event-item {
  padding: 12px;
  border-radius: 14px;
  background: #fff;
}
.hub-event-list li span {
  display: block;
  margin-top: 4px;
  color: var(--tg-hint, #6b7280);
  font-size: 12px;
}
.hub-event-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.hub-detail-root {
  position: fixed;
  inset: 0;
  z-index: 60;
}
.hub-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.hub-detail-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0;
  background: #fff;
}
.hub-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.hub-detail-header h2 {
  margin: 0;
  font-size: 20px;
}
.hub-detail-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: #e2e8f0;
  font-size: 22px;
  cursor: pointer;
}
.hub-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
@media (prefers-reduced-motion: reduce) {
  .hub-shell,
  .hub-card,
  .hub-detail-sheet {
    transition: none !important;
    animation: none !important;
  }
}
