/* ===== SPEC FORM ===== */
.spec-editor { max-width: 720px; }

.spec-editor .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.file-upload-area {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 14px;
}
.file-upload-area:hover { border-color: var(--accent); background: var(--accent-dim); }

.file-upload-area .upload-icon { font-size: 20px; margin-bottom: 4px; }
.file-upload-area .upload-text { font-size: 12px; color: var(--text-muted); }
.file-upload-area .upload-hint { font-size: 10px; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); }

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.file-chip .remove-file {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
}
.file-chip .remove-file:hover { color: var(--accent-red); }

.voice-recorder {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.voice-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.voice-btn:hover { border-color: var(--accent-red); color: var(--accent-red); }
.voice-btn.recording {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: var(--accent-red-dim);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

.voice-status {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.ai-preview {
  margin-top: 14px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.ai-preview-header {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-purple);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ai-preview-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.success-message {
  padding: 12px 16px;
  background: var(--accent-green-dim);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-md);
  color: var(--accent-green);
  font-size: 12px;
  margin-top: 14px;
  font-weight: 500;
}


/* ===== SPEC FORM LAYOUT ===== */
.spec-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.spec-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.spec-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.spec-attach-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.spec-attach-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.spec-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.spec-textarea-lg {
  width: 100%;
  min-height: 360px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  resize: vertical;
}
.spec-textarea-lg:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.char-counter {
  text-align: right;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 4px;
  transition: color 0.2s;
}

.spec-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}
.spec-convert-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
}
.spec-convert-status {
  font-size: 12px;
  font-weight: 500;
}

.spec-preview {
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 16px;
  animation: specPreviewIn 0.3s ease;
}
@keyframes specPreviewIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.spec-desc-preview {
  width: 100%;
  min-height: 320px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  resize: vertical;
}

/* --- Story cards (multi-story preview) --- */
.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}
.story-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.story-card-number {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.story-card-title {
  width: 100%;
  display: block;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  margin-bottom: 8px;
}
.story-card-desc {
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
  margin-bottom: 6px;
  resize: vertical;
}
.story-card-ac-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}
.story-card-ac {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  padding: 2px 0;
}
.story-card select {
  font-size: 11px;
  padding: 3px 8px;
}

/* --- Kanban card epic label badge --- */
.card-epic-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 1px 6px;
  border-radius: 3px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --- Inline editable select in card detail --- */
.inline-select {
  width: auto;
  min-width: 80px;
  padding: 2px 24px 2px 6px;
  font-size: 11px;
  font-family: var(--font-sans);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%236B7280' d='M2 3l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: border-color 0.2s;
}
.inline-select:hover { border-color: var(--accent); }
.inline-select:focus { outline: none; border-color: var(--accent); }
.inline-saved {
  border-color: var(--accent-green, #34D399) !important;
  box-shadow: 0 0 0 1px var(--accent-green-dim, rgba(52,211,153,0.3));
}

/* --- Epic label in card detail --- */
.card-epic-label-detail {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-purple, #A78BFA);
  background: var(--accent-purple-dim, rgba(167,139,250,0.12));
  padding: 2px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.spec-bottom-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-default);
  margin-top: 8px;
}
.spec-submit-btn {
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 700;
}

.raw-spec-section .raw-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-amber);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.raw-spec-section textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}

.raw-spec-section textarea:focus {
  outline: none;
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px var(--accent-amber-dim);
}

.convert-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

/* ===== TAB NAVIGATION ===== */
