/* ═══════════════════════════════════════════════════════════════════
   Chain of Custody panel styles
   ═══════════════════════════════════════════════════════════════════ */

/* ─── state chips ──────────────────────────────────────────────── */
.custody-chip {
  display: inline-block;
  font-family: var(--gc-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--gc-border);
  background: var(--gc-surface);
  color: var(--gc-ink);
  white-space: nowrap;
}
.custody-state-green {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}
.custody-state-amber {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}
.custody-state-red {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* ─── summary strip ────────────────────────────────────────────── */
.custody-strip {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gc-border);
  flex-wrap: wrap;
}
.custody-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 120px;
  padding: 4px 8px;
}
.custody-strip-label {
  font-family: var(--gc-mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gc-muted);
}
.custody-strip-divider {
  width: 1px;
  height: 36px;
  background: var(--gc-border);
  flex-shrink: 0;
}

/* ─── copies table (desktop) ───────────────────────────────────── */
.custody-table-wrap {
  overflow-x: auto;
}
.custody-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--gc-sans);
  font-size: 0.82rem;
}
.custody-table thead th {
  font-family: var(--gc-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gc-muted);
  background: var(--gc-surface);
  padding: 10px 12px;
  border-bottom: 1px solid var(--gc-border);
  text-align: left;
  white-space: nowrap;
}
.custody-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gc-border);
  vertical-align: middle;
  color: var(--gc-body);
}
.custody-table tbody tr:last-child td {
  border-bottom: none;
}
.custody-icon {
  color: var(--gc-orange);
  margin-right: 4px;
  font-size: 0.78rem;
}
.custody-ts {
  font-family: var(--gc-mono);
  font-size: 0.75rem;
  color: var(--gc-body);
  line-height: 1.3;
}
.custody-ts small {
  color: var(--gc-muted);
  font-size: 0.65rem;
}

/* ─── proof and action cells ───────────────────────────────────── */
.custody-proof-link {
  font-family: var(--gc-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gc-blue) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.custody-proof-link:hover {
  color: var(--gc-orange) !important;
  text-decoration: underline !important;
}
.custody-proof-hash {
  font-family: var(--gc-mono);
  font-size: 0.72rem;
  color: var(--gc-blue);
  cursor: pointer;
  white-space: nowrap;
}
.custody-proof-hash:hover {
  color: var(--gc-orange);
}
.custody-action-btn {
  display: inline-block;
  font-family: var(--gc-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--gc-border);
  background: var(--gc-white);
  color: var(--gc-ink);
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.15s;
  white-space: nowrap;
}
.custody-action-btn:hover {
  background: var(--gc-ink);
  color: var(--gc-white);
  border-color: var(--gc-ink);
}
.custody-action-danger {
  border-color: #fca5a5;
  color: #991b1b;
}
.custody-action-danger:hover {
  background: #991b1b;
  color: var(--gc-white);
  border-color: #991b1b;
}
.custody-muted {
  color: var(--gc-muted);
}

/* ─── empty + loading ──────────────────────────────────────────── */
.custody-loading,
.custody-empty {
  text-align: center;
  padding: 28px 16px;
  font-family: var(--gc-sans);
  font-size: 0.88rem;
  color: var(--gc-muted);
}
.custody-loading .spinner-grow {
  margin-right: 8px;
}
.custody-empty i {
  font-size: 1.2rem;
  margin-right: 6px;
  color: var(--gc-orange);
}

/* ─── mobile card view ─────────────────────────────────────────── */
.custody-cards-mobile {
  display: none;
}
@media (max-width: 767px) {
  .custody-table-wrap {
    display: none;
  }
  .custody-cards-mobile {
    display: block;
  }
  .custody-card-mobile {
    border: 1px solid var(--gc-border);
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
  }
  .custody-card-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--gc-surface);
    border-bottom: 1px solid var(--gc-border);
    font-family: var(--gc-sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gc-ink);
  }
  .custody-card-mobile-body {
    padding: 10px 14px;
  }
  .custody-card-mobile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--gc-border);
    font-size: 0.82rem;
  }
  .custody-card-mobile-row:last-child {
    border-bottom: none;
  }
  .custody-strip {
    flex-direction: column;
    gap: 4px;
  }
  .custody-strip-item {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    padding: 6px 0;
    border-bottom: 1px solid var(--gc-border);
  }
  .custody-strip-item:last-child {
    border-bottom: none;
  }
  .custody-strip-divider {
    display: none;
  }
}
