/* VeriCred — demo-specific styles. Tokens come from exec-shell.css. */

.notice {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 18px;
}

.notice strong {
  color: var(--text);
}

.standards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.standards li {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 11px;
}

/* --- tabs ---------------------------------------------------------------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  padding: 0;
}

.tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--text);
  background: var(--panel);
}

.tab[aria-selected='true'] {
  color: var(--text);
  background: var(--panel);
  border-color: var(--border);
  border-bottom: 1px solid var(--panel);
}

.tabpanel[hidden] {
  display: none;
}

/* --- layout -------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 18px;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 0;
}

.panel__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.panel__sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* --- forms --------------------------------------------------------------- */

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
  font-family: var(--shell-mono);
  font-size: 0.74rem;
  line-height: 1.5;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.actions .exec-btn {
  flex: 1 1 auto;
  justify-content: center;
}

/* --- code / hashes ------------------------------------------------------- */

.mono {
  font-family: var(--shell-mono);
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--muted);
}

.did-box {
  font-family: var(--shell-mono);
  font-size: 0.72rem;
  word-break: break-all;
  background: var(--panel-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  color: var(--accent-2);
}

pre.json {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow: auto;
  max-height: 340px;
  font-family: var(--shell-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

pre.json[hidden] {
  display: none;
}

/* --- credential cards ---------------------------------------------------- */

.cred {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--panel-2);
  padding: 16px;
  margin-bottom: 14px;
}

.cred--revoked {
  border-left-color: var(--danger);
}

.cred__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.cred__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.cred__meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.cred__competencies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.cred__competencies li {
  font-size: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pill--valid {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent);
}

.status-pill--revoked {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent);
}

.cred__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.cred__actions .exec-btn {
  flex: 1 1 130px;
  justify-content: center;
  font-size: 0.76rem;
  padding: 7px 10px;
}

/* --- verification result ------------------------------------------------- */

.result {
  margin-top: 16px;
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.result[hidden] {
  display: none;
}

.result--pass {
  border-color: color-mix(in srgb, var(--ok) 55%, transparent);
  background: color-mix(in srgb, var(--ok) 7%, transparent);
}

.result--fail {
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
}

.result__verdict {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.result--pass .result__verdict {
  color: var(--ok);
}

.result--fail .result__verdict {
  color: var(--danger);
}

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}

.check:first-child {
  border-top: none;
}

.check__icon {
  font-weight: 900;
  flex: none;
  width: 1.2em;
  text-align: center;
}

.check--ok .check__icon {
  color: var(--ok);
}

.check--no .check__icon {
  color: var(--danger);
}

.check__detail {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

/* --- ledger -------------------------------------------------------------- */

.block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 0.78rem;
}

.block__index {
  font-weight: 700;
  color: var(--accent);
}

.block dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 12px;
  margin: 8px 0 0;
}

.block dt {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.block dd {
  margin: 0;
  font-family: var(--shell-mono);
  font-size: 0.7rem;
  word-break: break-all;
}

.empty {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0;
}

/* --- toast --------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--shell-speed) ease;
  z-index: 8000;
  max-width: calc(100vw - 2 * var(--gutter));
}

.toast--show {
  opacity: 1;
}

@media (max-width: 720px) {
  .block dl {
    grid-template-columns: 1fr;
  }
}

.actions--spaced {
  margin-bottom: 16px;
}
