.topbar {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 11px;
  border-radius: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 180px;
}
.topbar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 10px 4px 0;
  border-right: 1px solid var(--border);
  margin-right: 4px;
}
.topbar-brand__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.live-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: calc(12 / 17 * 1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8fd4ff;
  border: 1px solid rgba(80, 170, 255, 0.45);
  background: rgba(80, 170, 255, 0.12);
}
.publish-status {
  font-size: calc(13 / 17 * 1rem);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.publish-status--idle {
  color: var(--muted);
}
.publish-status--pending {
  color: #f0c060;
  border-color: rgba(240, 192, 96, 0.35);
  background: rgba(240, 192, 96, 0.08);
}
.publish-status--saving {
  color: #8fd4ff;
  border-color: rgba(80, 170, 255, 0.35);
  background: rgba(80, 170, 255, 0.1);
}
.publish-status--saved {
  color: #7ddea0;
  border-color: rgba(90, 210, 130, 0.35);
  background: rgba(90, 210, 130, 0.1);
}
.publish-status--error {
  color: #ff8f8f;
  border-color: rgba(255, 120, 120, 0.4);
  background: rgba(255, 120, 120, 0.1);
}
.issues-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 170, 0, 0.35);
  background: rgba(255, 170, 0, 0.08);
  max-width: 360px;
  font-size: calc(13 / 17 * 1rem);
}
.issues-panel__header {
  display: flex;
  align-items: center;
}
.issues-panel__toggle {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 170, 0, 0.35);
  background: rgba(255, 170, 0, 0.12);
  color: var(--text);
  cursor: pointer;
}
.issues-panel__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.issues-panel__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: start;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.issues-panel__label {
  font-weight: 600;
  grid-column: 1 / -1;
}
.issues-panel__details {
  color: var(--muted);
  font-size: calc(12 / 17 * 1rem);
}
.issues-panel__go {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 170, 0, 0.35);
  background: rgba(255, 170, 0, 0.12);
}
.issues-panel__more {
  color: var(--muted);
  font-size: calc(12 / 17 * 1rem);
}
.topbar.topbar--gate .topbar-brand {
  border-right: none;
  margin-right: 0;
  padding: 0 0 12px;
  width: 100%;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.topbar.topbar--gate {
  flex-direction: column;
  align-items: stretch;
  max-width: 420px;
}
.topbar.topbar--gate > .topbar-right {
  margin-left: 0;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 170, 0, 0.35);
  background: rgba(255, 170, 0, 0.08);
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  max-width: 520px;
}
.topbar-banner__text {
  color: var(--text);
  opacity: 0.95;
}
.topbar-banner__btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 170, 0, 0.35);
  background: rgba(255, 170, 0, 0.12);
}
.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  font-size: 1.15rem;
  line-height: 1;
}
.topbar input[type='password'] {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 16px;
}
/* Token field: use type=text + CSS masking to avoid browser “save password” prompts. */
#token {
  -webkit-text-security: disc;
  font-size: 1rem;
  padding: 11px 12px;
}
.smr-app-title {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
}
.shell-tips-body {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}
.navbtn {
  padding: 11px 15px;
}
