.vcs-codex-card,
.settings-vcs-codex-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(247, 249, 252, 0.98), rgba(236, 242, 248, 0.96));
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.vcs-codex-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.vcs-codex-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.vcs-codex-head-copy {
  display: grid;
  gap: 6px;
}

.vcs-codex-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5563;
}

.vcs-codex-title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.15;
  color: #0f172a;
}

.vcs-codex-help {
  margin: 0;
  max-width: 46ch;
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.5;
}

.vcs-codex-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.vcs-codex-refresh-btn,
.vcs-codex-secondary-link {
  white-space: nowrap;
}

.vcs-codex-form {
  display: grid;
  gap: 12px;
}

.vcs-codex-field {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
}

.vcs-codex-field input,
.vcs-codex-field textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 12px 14px;
  font: inherit;
  resize: vertical;
}

.vcs-codex-field input:focus,
.vcs-codex-field textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  border-color: rgba(37, 99, 235, 0.42);
}

.vcs-codex-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.vcs-codex-updated {
  font-size: 0.8rem;
  color: #64748b;
  text-align: right;
}

.vcs-codex-flash,
.vcs-codex-loading,
.vcs-codex-error,
.vcs-codex-empty {
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 0.9rem;
}

.vcs-codex-flash,
.vcs-codex-loading,
.vcs-codex-empty {
  background: rgba(226, 232, 240, 0.7);
  color: #334155;
}

.vcs-codex-flash.is-error,
.vcs-codex-error {
  background: rgba(254, 226, 226, 0.85);
  color: #991b1b;
}

.vcs-codex-task-list {
  display: grid;
  gap: 10px;
}

.vcs-codex-task-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.vcs-codex-task-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.vcs-codex-task-title {
  color: #0f172a;
  line-height: 1.35;
}

.vcs-codex-task-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(226, 232, 240, 0.9);
  color: #334155;
}

.vcs-codex-task-status.is-queued {
  background: rgba(219, 234, 254, 0.95);
  color: #1d4ed8;
}

.vcs-codex-task-status.is-running {
  background: rgba(254, 240, 138, 0.95);
  color: #92400e;
}

.vcs-codex-task-status.is-done {
  background: rgba(220, 252, 231, 0.95);
  color: #166534;
}

.vcs-codex-task-status.is-failed,
.vcs-codex-task-status.is-cancelled {
  background: rgba(254, 226, 226, 0.95);
  color: #991b1b;
}

.vcs-codex-task-prompt {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .vcs-codex-panel {
    padding: 16px;
  }

  .vcs-codex-head,
  .vcs-codex-form-actions {
    grid-auto-flow: row;
    display: grid;
  }

  .vcs-codex-head-actions {
    justify-content: flex-start;
  }

  .vcs-codex-updated {
    text-align: left;
  }
}
