/* Base Layout & Reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button, input, select, textarea {
  font: inherit;
}

button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  flex-shrink: 0;
}

p, h1, h2, h3, dl, dd, ol, ul {
  margin: 0;
}

input[type="checkbox"], input[type="radio"] {
  accent-color: #4f46e5;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.rotated {
  transform: rotate(180deg);
}

/* Steps Pipeline (Expanded view) */
.steps {
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 16px 0;
  gap: 8px;
}

.steps li {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ceramic-text-muted);
}

.steps li > span {
  width: 20px;
  height: 20px;
  border: 1px solid var(--ceramic-border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--ceramic-card);
}

.steps li.done {
  color: var(--status-green);
  font-weight: 600;
}

.steps li.done > span {
  background: var(--status-green);
  color: #ffffff;
  border-color: var(--status-green);
}

.steps li.live {
  color: var(--ceramic-text-main);
  font-weight: 700;
}

.steps li.live > span {
  border-color: var(--accent-600);
  color: var(--accent-600);
}

/* Detail Data Table */
.detail-data {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  font-size: 11px;
  gap: 8px 10px;
  line-height: 1.6;
  margin: 14px 0;
}

.detail-data dt {
  color: var(--ceramic-text-muted);
}

.detail-data dd {
  color: var(--ceramic-text-main);
  font-family: 'JetBrains Mono', monospace;
  overflow-wrap: anywhere;
}

.result-link {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--ceramic-subtle);
  border: 1px solid var(--ceramic-border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 10px;
}

.result-link code {
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
  color: var(--accent-600);
}

/* Task Timeline Logs */
.task-timeline {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 11px;
}

.task-timeline li {
  position: relative;
  padding: 0 0 14px 14px;
  margin-left: 4px;
  border-left: 1.5px solid var(--ceramic-border);
}

.task-timeline li::before {
  content: '';
  position: absolute;
  top: 4px;
  left: -4px;
  width: 6px;
  height: 6px;
  background: #cbd5e1;
  border-radius: 50%;
}

.task-timeline li:last-child {
  border-color: transparent;
  padding-bottom: 0;
}

.task-timeline time {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ceramic-text-muted);
}

.task-timeline p {
  color: var(--ceramic-text-main);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Reconcile Input Box */
.reconcile {
  margin-top: 14px;
  background: var(--ceramic-subtle);
  border: 1px solid var(--ceramic-border);
  border-radius: 12px;
  padding: 12px;
}

.reconcile > label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ceramic-text-muted);
  display: block;
}

.reconcile > div {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.task-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.task-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--ceramic-border);
}

.task-pagination-label {
  color: var(--ceramic-text-muted);
  font-size: 11px;
  font-weight: 600;
}

.task-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.task-page-controls > span {
  min-width: 42px;
  text-align: center;
  color: var(--ceramic-text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.panel-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 11px;
  color: var(--ceramic-text-muted);
}
