/* Full-screen Console hub — matches live wealthtracker.us /broker. */

.hub-console {
  position: relative;
  min-height: 100vh;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--desk-bg);
  color: var(--desk-text);
}

.hub-ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.85;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(82, 227, 155, 0.06), transparent 55%),
    radial-gradient(700px 380px at 88% 0%, rgba(119, 167, 255, 0.04), transparent 50%);
}

.hub-console-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--desk-border);
  background: color-mix(in srgb, var(--desk-bg) 92%, transparent);
  backdrop-filter: blur(16px);
}

.hub-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 20px;
}

.hub-header-title {
  min-width: 0;
}

.hub-header-title h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-header-title p {
  margin: 0;
  font-size: 10px;
  color: var(--desk-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-header-spacer {
  flex: 1;
}

.hub-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hub-header-email {
  display: none;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--desk-text-muted);
}

@media (min-width: 640px) {
  .hub-header-email {
    display: inline;
  }
}

.hub-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  flex-shrink: 0;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--desk-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--desk-text);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hub-back:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--wt-accent) 50%, var(--desk-border));
  background: rgba(82, 227, 155, 0.1);
}

.hub-back:disabled {
  opacity: 0.6;
  cursor: wait;
}

.hub-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hub-ico-lg {
  width: 20px;
  height: 20px;
}

.hub-ico-cyan { color: var(--wt-cyan, #77a7ff); }
.hub-ico-purple { color: var(--wt-purple, #a78bfa); }
.hub-ico-red { color: #fca5a5; }

.hub-main {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.hub-main--tight {
  padding-top: 24px;
  padding-bottom: 64px;
}

.hub-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hub-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}

@media (min-width: 640px) {
  .hub-hero {
    flex-direction: row;
    align-items: center;
  }
}

.hub-hero-mark {
  display: flex;
  height: 56px;
  width: 36px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.hub-hero-mark img {
  height: 52px;
  width: 32px;
  object-fit: contain;
}

.hub-hero-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

@media (min-width: 640px) {
  .hub-hero-title {
    font-size: 32px;
  }
}

.hub-hero-sub {
  margin: 4px 0 0;
  max-width: 28rem;
  font-size: 14px;
  line-height: 1.5;
  color: var(--desk-text-soft);
}

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

@media (min-width: 640px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hub-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hub-grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hub-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hub-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hub-nav-card {
  display: block;
  padding: 20px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hub-nav-card:hover {
  border-color: rgba(82, 227, 155, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.hub-nav-icon {
  display: flex;
  height: 48px;
  width: 48px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--wt-surface-0, rgba(0, 0, 0, 0.28));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hub-nav-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

.hub-nav-desc {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--desk-text-muted);
}

.hub-section-head {
  margin-bottom: 32px;
}

.hub-section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.hub-section-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--desk-text-soft);
}

.hub-broker-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.hub-broker-mark {
  display: flex;
  height: 40px;
  width: 28px;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
}

.hub-broker-mark img {
  height: 36px;
  width: 22px;
  object-fit: contain;
}

.hub-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  color: var(--desk-text-muted);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hub-status-pill.is-on {
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.3);
}

.hub-status-pill.is-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.hub-status-pill.is-err {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35);
}

.hub-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  border: 1px solid var(--desk-border);
  background: color-mix(in srgb, var(--desk-panel) 80%, transparent);
  color: var(--desk-text);
  font-size: 12px;
  padding: 6px 12px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hub-btn-ghost:hover {
  border-color: color-mix(in srgb, var(--wt-purple) 40%, var(--desk-border));
  background: rgba(82, 227, 155, 0.1);
  color: var(--wt-text);
}

.hub-flash-wrap {
  position: relative;
  max-width: 72rem;
  margin: 12px auto 0;
  padding: 0 20px;
}

.hub-flash {
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(6, 78, 59, 0.4);
  color: #a7f3d0;
  font-size: 12px;
  padding: 10px 16px;
}

.hub-flash.is-err {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(69, 10, 10, 0.5);
  color: #fecaca;
}

.hub-panel {
  padding: 20px;
  overflow: hidden;
}

.hub-panel h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.hub-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hub-panel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-panel-copy {
  margin: 4px 0 0;
  max-width: 42rem;
  font-size: 11px;
  line-height: 1.55;
  color: var(--desk-text-muted);
}

.hub-info-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hub-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hub-info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hub-info-tile {
  border-radius: 12px;
  border: 1px solid var(--desk-border);
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
}

.hub-info-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--desk-text-muted);
}

.hub-info-value {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.hub-info-value.is-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hub-callout {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
  font-size: 11px;
  padding: 12px;
}

.hub-callout.is-on {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  color: #d1fae5;
}

.hub-callout-title {
  margin: 0;
  font-weight: 600;
}

.hub-callout-body {
  margin: 4px 0 0;
  opacity: 0.85;
}

.hub-callout-err {
  margin: 4px 0 0;
  color: #fecaca;
}

.hub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.hub-hint {
  font-size: 10px;
  color: var(--desk-text-muted);
}

.hub-gateway-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 1024px) {
  .hub-gateway-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hub-mode-card {
  border-radius: 12px;
  border: 1px solid var(--desk-border);
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
}

.hub-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.hub-mode-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-mode-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.hub-cred-dot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 10px;
  color: var(--desk-text-muted);
}

.hub-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #52525b;
}

.hub-dot.is-on {
  background: #34d399;
}

.hub-field {
  width: 100%;
  margin-top: 6px;
}

.hub-field-label {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  color: var(--desk-text-muted);
}

.hub-panel .rail-mod-row {
  margin: 6px 0;
}

.hub-nick-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.hub-nick-row {
  display: flex;
  flex-direction: column;
}

.hub-screen,
.hub-logs {
  margin-top: 16px;
}

.hub-screen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.hub-screen-bar h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--desk-text-muted);
}

.hub-log-pre {
  max-height: 12rem;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--desk-border);
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--desk-text-soft);
}

.vnc-host {
  min-height: 320px;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid var(--desk-border);
  background: #000;
}

.gateway-vnc-frame {
  display: flex;
  height: 420px;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--desk-border);
  border-radius: 8px;
  background: var(--desk-bg);
}

.gateway-vnc-frame.vnc-expanded {
  position: fixed;
  z-index: 200;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
}

.gateway-vnc-toolbar {
  display: flex;
  min-height: 31px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border-bottom: 1px solid var(--desk-border);
  background: var(--desk-bg);
  padding: 4px 8px;
}

.gateway-vnc-state {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #52525b;
}

.gateway-vnc-state.is-on {
  background: #34d399;
}

.gateway-vnc-state.is-warn {
  background: #fbbf24;
}

.gateway-vnc-state.is-error {
  background: #f87171;
}

.gateway-vnc-label {
  flex: 0 0 auto;
  color: var(--desk-text-soft);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gateway-vnc-error {
  min-width: 0;
  overflow: hidden;
  color: #f88;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gateway-vnc-fullscreen {
  height: 24px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0 8px;
  font-size: 10px;
}

.gateway-vnc-frame .vnc-host {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  margin-top: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
}
