.topbar {
  flex: 0 0 auto;
  background: #696969;
  border-bottom: 1px solid #2d2d33;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.timer-progress {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.timer-progress-track {
  position: relative;
  width: 140px;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.timer-progress-fill {
  position: absolute;
  inset: 0;
  width: calc(var(--progress, 0) * 100%);
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s linear;
}

.timer-progress-icon {
  position: absolute;
  top: 50%;
  left: calc(var(--progress, 0) * 100%);
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  background: var(--accent);
  border-radius: 50%;
  transition: left 0.3s linear;
  pointer-events: none;
}

.timer-progress-icon svg {
  width: 8px;
  height: 8px;
}

.timer-progress-time {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 1px;
}

.timer-progress.timer-warning .timer-progress-fill,
.timer-progress.timer-warning .timer-progress-icon {
  background: #f43f5e;
}

.timer-progress-time.timer-warning {
  color: #f43f5e;
}

.topbar-actions #indexLabel {
  background: rgba(255,255,255,0.04);
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.topbar-actions #indexLabel:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.topbar-actions #indexLabel:disabled {
  cursor: not-allowed;
}

.index-input {
  width: 64px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(29, 78, 216, 0.6);
  border-radius: 8px;
  padding: 10px 8px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
  text-align: center;
  appearance: none;
}

.index-input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1);
}

.topbar-actions .quick-buttons {
  flex-direction: column;
  gap: 6px;
}

.topbar-actions .quick-buttons button {
  flex: 0 0 auto;
}
