/* === Job Bar === */
.job-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px var(--space-4) 6px;
  flex-shrink: 0;
}

.job-name-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.job-name-btn:active { background: rgba(65, 135, 255, 0.1); }

.job-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.job-name-text {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-chevron {
  width: 10px;
  height: 7px;
  flex-shrink: 0;
  opacity: 0.5;
}
.job-chevron svg { width: 10px; height: 7px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.job-badge {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: 4px;
  padding: 2px 6px;
}

.job-badge:empty { display: none; }

/* === Job Switcher === */
.job-switcher-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 149;
}
.job-switcher-overlay[hidden] { display: none; }

.job-switcher {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  max-height: 70vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-bg);
  border-top: 2px solid var(--color-accent-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 150;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.job-switcher[hidden] { display: none; }

.job-switcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.job-switcher-title {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.job-switcher-new {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-accent);
  background: rgba(65, 135, 255, 0.1);
  border: 1px solid rgba(65, 135, 255, 0.2);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  touch-action: manipulation;
}
.job-switcher-new:active { background: rgba(65, 135, 255, 0.2); }

.job-switcher-list {
  padding: var(--space-2) var(--space-3);
}

/* --- Job cards in switcher --- */
.job-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.job-card:active { background: rgba(65, 135, 255, 0.08); }

.job-card.active {
  border-color: rgba(65, 135, 255, 0.3);
  background: rgba(65, 135, 255, 0.1);
}

.jc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.jc-body { flex: 1; min-width: 0; }

.jc-name {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-card.active .jc-name { color: var(--color-accent); }

.jc-meta {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.jc-count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.job-card.active .jc-count { color: var(--color-accent); }

/* === New Job Dialog === */
.new-job-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
}
.new-job-overlay[hidden] { display: none; }

.new-job-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, 90vw);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  z-index: 200;
}
.new-job-dialog[hidden] { display: none; }

.new-job-dialog h3 {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.new-job-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--color-accent-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}
.new-job-input:focus { outline: none; border-color: var(--color-accent); }
.new-job-input::placeholder { color: var(--color-text-muted); }

.new-job-color-label {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 6px;
}

.new-job-colors {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.new-job-color {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.new-job-color.selected { border-color: #fff; }

.new-job-btns {
  display: flex;
  gap: var(--space-2);
}

.new-job-btn {
  flex: 1;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  touch-action: manipulation;
}

.new-job-btn.cancel {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.new-job-btn.create {
  background: var(--color-accent-strong);
  color: #fff;
  border: none;
}

.new-job-btn:active { opacity: 0.8; }
