/* Unified worker summary, account header, currency and compact rows. */
/* Unified account header and sidebar worker summary — 2026-08-06. */
.worker-panel-heading {
  display: grid;
  gap: 11px;
  padding: 14px 12px 11px;
}
.worker-panel-heading > div { min-width: 0; }
.worker-panel-heading h2 { font-size: 19px; }

.worker-panel-heading .summary {
  width: 100%;
  display: grid;
  grid-template-columns: 1.25fr .85fr .8fr .9fr;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(9, 15, 25, .5);
}
.worker-panel-heading .metric {
  min-width: 0;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 5px 4px;
  background: transparent;
  white-space: nowrap;
}
.worker-panel-heading .metric:last-child { border-right: 0; }
.worker-panel-heading .metric span {
  display: inline;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
  text-overflow: ellipsis;
}
.worker-panel-heading .metric strong {
  display: inline;
  margin: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.worker-panel-heading .metric-updated span { display: none; }
.worker-panel-heading .metric-updated strong { color: var(--accent); font-size: 10px; }

.account-control-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 18px;
  padding: 13px 16px 12px;
}
.account-identity {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.account-server { margin-bottom: 0; }
.account-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.detail-header .account-title {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-message {
  max-width: 860px;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-title-row .revive-toolbar {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 0;
  border: 0;
  background: transparent;
}
.account-title-row .revive-toggle {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}
.account-title-row .revive-toggle:hover { color: var(--text); }
.account-title-row .revive-toggle-label { white-space: nowrap; }
.account-title-row .revive-toggle-track {
  width: 28px;
  height: 16px;
  border-radius: 999px;
}
.account-title-row .revive-toggle-track span {
  left: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
}
.account-title-row .revive-toggle input:checked + .revive-toggle-track span {
  transform: translateX(12px);
}
.account-title-row .revive-status {
  max-width: 112px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-title-row .revive-status.ready { color: var(--good); }
.account-title-row .revive-status.waiting,
.account-title-row .revive-status.pending { color: var(--warn); }
.account-title-row .revive-status.error,
.account-title-row .revive-status.offline { color: var(--bad); }
.account-title-row .revive-meta { display: none; }
.account-title-row .revive-feedback {
  flex: 1 0 100%;
  min-height: 0;
  margin: -1px 0 0;
  font-size: 9px;
  line-height: 1.2;
}

.account-control-card .test-room-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}
.account-control-card .test-room-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}
.account-control-card .test-room-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 5px;
}
.account-control-card .test-room-button {
  min-height: 27px;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 9px;
  line-height: 1.1;
}
.account-control-card .test-room-state {
  max-width: 360px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-control-card .test-room-lobby,
.account-control-card .test-room-feedback {
  flex: 1 0 100%;
}
.account-control-card .test-room-lobby { padding-top: 1px; }
.account-control-card .test-room-lobby-head { padding-top: 6px; }
.account-control-card .test-room-feedback {
  min-height: 0;
  font-size: 9px;
  line-height: 1.2;
}

.account-control-card .account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

@media (max-width: 1120px) {
  .account-control-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .account-control-card .account-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .worker-panel-heading {
    grid-template-columns: auto minmax(250px, 1fr);
    align-items: center;
    gap: 10px 16px;
  }
  .worker-panel-heading .summary { max-width: 430px; justify-self: end; }
}

@media (max-width: 640px) {
  .worker-panel-heading {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .worker-panel-heading .summary {
    max-width: none;
    justify-self: stretch;
  }
  .account-control-card { padding: 12px; }
  .account-title-row { align-items: center; }
  .account-title-row .revive-toolbar { flex: 0 0 auto; }
  .account-control-card .test-room-toolbar { align-items: flex-start; }
  .account-control-card .test-room-state {
    flex: 1 1 100%;
    max-width: none;
  }
}

@media (max-width: 430px) {
  .worker-panel-heading .metric span { font-size: 7.5px; }
  .worker-panel-heading .metric strong { font-size: 10px; }
  .detail-header .account-title { max-width: 100%; }
  .account-title-row .revive-status { display: none; }
  .account-control-card .test-room-label { width: 100%; }
  .account-control-card .test-room-actions { width: 100%; }
  .account-control-card .test-room-button { flex: 1 1 auto; min-height: 34px; }
}

.worker-panel-heading .summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Compact currency balances beside the account name. */
.account-title-row .currency-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 0;
}
.account-title-row .currency-badge {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid rgba(105, 213, 255, .25);
  border-radius: 999px;
  background: rgba(105, 213, 255, .07);
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
.account-title-row .money-badge {
  border-color: rgba(255, 199, 106, .28);
  background: rgba(255, 199, 106, .07);
}
.account-title-row .currency-badge strong {
  color: var(--accent);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.account-title-row .money-badge strong { color: var(--warn); }
.account-title-row .currency-badge.unknown {
  border-color: var(--line);
  background: transparent;
}
.account-title-row .currency-badge.unknown strong { color: var(--muted); }

@media (max-width: 560px) {
  .account-title-row .currency-badges {
    width: 100%;
    order: 3;
  }
  .account-title-row .currency-badge {
    min-height: 22px;
    padding-inline: 6px;
  }
}

/* Compact worker account rows — one title line plus a dense status/balance line. */
.account-list {
  padding: 5px 7px;
}
.account-row {
  min-height: 46px;
  gap: 5px;
  margin-bottom: 5px;
}
.account-row .account-button {
  min-height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 5px 8px;
  margin: 0;
  border-radius: 10px;
}
.account-row .account-button strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-row .account-row-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1;
  white-space: nowrap;
}
.account-row .account-row-meta > span + span::before {
  content: '·';
  margin-right: 6px;
  color: #4f6079;
}
.account-row .account-button .mini-status {
  margin: 0;
  flex: 0 0 auto;
  color: var(--good);
  font-size: inherit;
  line-height: inherit;
}
.account-row .account-balance {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}
.account-row .account-balance.money { color: var(--warn); }
.account-row .account-balance.bound { color: var(--accent); }
.account-row .account-balance.unknown { color: var(--muted); }
.account-row .account-exit-button {
  min-width: 50px;
  min-height: 46px;
  padding: 4px 7px;
  border-radius: 9px;
  font-size: 9px;
}

@media (max-width: 640px) {
  .account-row,
  .account-row .account-button,
  .account-row .account-exit-button {
    min-height: 46px;
  }
}
