.rst-tab-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.rst-tab-btn {
  border: none;
  border-bottom: 1.5px solid transparent;
  background: transparent;
  color: #666666;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 2px;
  border-radius: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.rst-tab-btn:hover {
  color: #cccccc;
}

.rst-tab-btn.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.rst-tab-count {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #666666;
}

.rst-tab-btn.active .rst-tab-count {
  color: #a3a3a3;
}

.rst-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #0e0e0e;
  padding: 4px 8px;
}

.rst-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 12px 4px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.rst-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #ffffff;
  min-width: 0;
}

.rst-back-btn {
  border: none;
  background: transparent;
  color: #888888;
  padding: 2px 4px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rst-back-btn:hover {
  color: #ffffff;
}

.rst-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rst-branch-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: #161616;
  color: #ffffff;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  max-width: 200px;
  min-width: 0;
}

.rst-branch-highlight-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
}

.rst-branch-highlight-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rst-branch-select {
  height: 24px;
  font-size: 11px;
  font-family: var(--font-mono);
  max-width: 170px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #2a2a2a;
  border-radius: 0;
  color: #ffffff;
  padding: 0 18px 0 4px;
  cursor: pointer;
}

.rst-branch-select:focus {
  outline: none;
  border-bottom-color: #ffffff;
}

.rst-branch-select option {
  background: #121212;
  color: #ffffff;
}

.rst-icon-btn {
  border: none;
  background: transparent;
  color: #737373;
  width: 24px;
  height: 24px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rst-icon-btn:hover {
  color: #ffffff;
}

.rst-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rst-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 4px;
  scrollbar-width: thin;
  scrollbar-color: #262626 transparent;
}

.rst-scroll::-webkit-scrollbar,
.rst-files-list::-webkit-scrollbar,
.rst-file-diff::-webkit-scrollbar,
.rst-history-list::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.rst-scroll::-webkit-scrollbar-track,
.rst-files-list::-webkit-scrollbar-track,
.rst-file-diff::-webkit-scrollbar-track,
.rst-history-list::-webkit-scrollbar-track {
  background: transparent;
}

.rst-scroll::-webkit-scrollbar-thumb,
.rst-files-list::-webkit-scrollbar-thumb,
.rst-file-diff::-webkit-scrollbar-thumb,
.rst-history-list::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 99px;
}

.rst-meta-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.rst-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.rst-sha-flow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #e5e5e5;
}

.rst-arrow {
  color: #525252;
}

.rst-backup-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #666666;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rst-backup-text strong {
  color: #a3a3a3;
  font-weight: 500;
}

.rst-kv-list {
  display: flex;
  flex-direction: column;
}

.rst-kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #161616;
  font-size: 11px;
  color: #e5e5e5;
}

.rst-kv > span:first-child {
  color: #666666;
  font-size: 10.5px;
  flex-shrink: 0;
}

.rst-kv code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #ffffff;
}

.rst-link {
  color: #e5e5e5;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  border-bottom: 1px solid #383838;
}

.rst-link:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.rst-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #ffffff;
}

.rst-dot.muted {
  background: #525252;
}

.rst-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #a3a3a3;
  text-transform: uppercase;
}

.rst-tag.is-dim {
  color: #525252;
}

.rst-banner {
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.45;
  background: transparent;
  border-left: 2px solid #525252;
  color: #a3a3a3;
  margin: 6px 0;
  flex-shrink: 0;
}

.rst-banner.tone-strong {
  border-left-color: #ffffff;
  color: #f5f5f5;
}

.rst-banner code {
  font-family: var(--font-mono);
  color: #ffffff;
}

.rst-banner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rst-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #737373;
  font-size: 11.5px;
}

.rst-loading code {
  color: #ffffff;
}

.rst-files-zone {
  flex: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rst-files-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.rst-chips {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.rst-chip {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid transparent;
  color: #666666;
  border-radius: 0;
  font-size: 10.5px;
  font-family: var(--font-mono);
  padding: 4px 1px;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.rst-chip:hover {
  color: #cccccc;
}

.rst-chip.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.rst-search {
  height: 22px;
  font-size: 11px;
  width: 150px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #222222;
  border-radius: 0;
  color: #e5e5e5;
  padding: 0 4px;
}

.rst-search:focus {
  outline: none;
  border-bottom-color: #ffffff;
}

.rst-files-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #262626 transparent;
}

.rst-file-row {
  border-bottom: 1px solid #141414;
}

.rst-file-row:last-child {
  border-bottom: none;
}

.rst-file-row-head {
  width: 100%;
  border: none;
  background: transparent;
  color: #e5e5e5;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
}

.rst-file-row-head:hover {
  background: #131313;
}

.rst-file-mark {
  width: 12px;
  display: inline-block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  color: #a3a3a3;
}

.rst-file-mark.is-add {
  color: #ffffff;
}

.rst-file-mark.is-modify {
  color: #a3a3a3;
}

.rst-file-mark.is-remove {
  color: #525252;
}

.rst-file-path {
  font-family: var(--font-mono);
  font-size: 11px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e5e5e5;
}

.rst-file-row.is-remove .rst-file-path {
  color: #666666;
  text-decoration: line-through;
  text-decoration-color: #404040;
}

.rst-file-chevron {
  color: #444444;
  flex-shrink: 0;
  transition: transform 0.14s ease, color 0.14s ease;
}

.rst-file-row-head:hover .rst-file-chevron,
.rst-file-row.is-open .rst-file-chevron {
  color: #cccccc;
}

.rst-file-row.is-open .rst-file-chevron {
  transform: rotate(90deg);
}

.rst-file-diff {
  background: #0a0a0a;
  max-height: 220px;
  overflow: auto;
  margin: 0 0 6px 22px;
  border-left: 1px solid #222222;
  scrollbar-width: thin;
  scrollbar-color: #262626 transparent;
}

.rst-file-diff .diff-line {
  background: transparent;
  color: #888888;
  border-left: 2px solid transparent;
}

.rst-file-diff .diff-line .diff-num {
  color: #4a4a4a;
}

.rst-file-diff .diff-line.diff-add {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-left: 2px solid #ffffff;
}

.rst-file-diff .diff-line.diff-del {
  background: rgba(255, 255, 255, 0.015);
  color: #666666;
  border-left: 2px solid #444444;
}

.rst-file-diff .diff-fold-strip {
  background: #111111;
  border-color: #1a1a1a;
  color: #666666;
}

.rst-diff-note {
  padding: 8px 10px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #737373;
}

.rst-diff-note.is-strong {
  color: #ffffff;
}

.rst-bottom-zone {
  border-top: 1px solid #1a1a1a;
  padding: 10px 4px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.rst-commit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rst-brand-commit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
  border-bottom: 1px solid #222222;
  padding-bottom: 4px;
}

.rst-brand-lock {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  user-select: none;
  flex-shrink: 0;
}

.rst-brand-sep {
  color: #444444;
  user-select: none;
  flex-shrink: 0;
}

.rst-note-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: #a3a3a3;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0;
}

.rst-note-input:focus {
  outline: none;
  color: #ffffff;
}

.rst-webhook-toggle {
  border: none;
  background: transparent;
  color: #666666;
  font-family: var(--font-mono);
  font-size: 10.5px;
  cursor: pointer;
  padding: 2px 0;
  flex-shrink: 0;
}

.rst-webhook-toggle:hover,
.rst-webhook-toggle.is-active {
  color: #ffffff;
}

.rst-webhook-drawer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 0 2px 0;
}

.rst-radio-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #a3a3a3;
}

.rst-radio-row label,
.rst-check-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
  color: #a3a3a3;
}

.rst-line-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #262626;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 0;
}

.rst-line-input:focus {
  outline: none;
  border-bottom-color: #ffffff;
}

.rst-field-hint {
  font-size: 10px;
  color: #666666;
}

.rst-field-hint.is-strong {
  color: #ffffff;
}

.rst-hook-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rst-progress {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px 0;
  flex-shrink: 0;
}

.rst-progress-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #a3a3a3;
}

.rst-progress-track {
  height: 2px;
  width: 100%;
  background: #1f1f1f;
  overflow: hidden;
}

.rst-progress-fill {
  height: 100%;
  background: #ffffff;
  transition: width 0.18s ease;
}

.rst-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rst-actions-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rst-empty-inline {
  text-align: center;
  font-size: 11px;
  color: #666666;
  padding: 20px 8px;
}

.rst-empty-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 24px;
}

.rst-history-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: #262626 transparent;
}

.rst-hist-item {
  padding: 10px 8px 10px 10px;
  border-bottom: 1px solid #161616;
  border-left: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.rst-hist-item:hover {
  background: #131313;
}

.rst-hist-item.is-selected {
  border-left-color: #ffffff;
  background: #141414;
}

.rst-hist-top,
.rst-hist-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rst-hist-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rst-sha {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.rst-time,
.rst-hist-meta,
.rst-undone-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #666666;
}

.rst-hist-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rst-btn-undo {
  padding: 1px 8px;
  font-size: 10px;
  height: 20px;
  flex-shrink: 0;
}