/* ==========================================================================
   Public Certificate / Proof Pages
   /certs/snapshot/{id}, /certs/release/{id}, /certs/preservation/{id}, /certs/attestation/{id}
   Standalone, shareable evidence certificates.
   ========================================================================== */

.cert-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ── Card ── */
.cert-card {
    border: none;
    border-radius: var(--crypto-radius-md, 12px);
    overflow: hidden;
    position: relative;
    max-width: 640px;
    width: 100%;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.cert-card--snapshot::before {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.cert-card--attestation::before {
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.cert-card--release::before {
    background: linear-gradient(90deg, #22c55e, #06b6d4);
}

.cert-card--preservation::before {
    background: linear-gradient(90deg, #8b5cf6, #a855f7);
}

/* ── Header ── */
.cert-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.cert-badge-type {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cert-badge-type--snapshot {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.cert-badge-type--attestation {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.cert-badge-type--release {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.cert-badge-type--preservation {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.cert-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.75rem 0 0.25rem;
    word-break: break-word;
}

.cert-subtitle {
    color: var(--tblr-secondary);
    margin: 0;
    font-size: 0.875rem;
}

/* Workspace avatar with status dot overlay */
.cert-avatar-seal {
    position: relative;
    flex-shrink: 0;
}

.cert-avatar-seal img {
    width: 56px;
    height: 56px;
    object-fit: cover;
}

.cert-avatar-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--tblr-card-bg, #fff);
}

.cert-avatar-dot--confirmed {
    background: var(--tblr-success);
}

.cert-avatar-dot--pending {
    background: var(--tblr-warning);
}

/* ── Data Grid ── */
.cert-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 576px) {
    .cert-data-grid {
        grid-template-columns: 1fr;
    }
}

.cert-data-item label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tblr-secondary);
    margin-bottom: 0.25rem;
}

.cert-data-item .value {
    font-family: var(--tblr-font-monospace);
    font-size: 0.8125rem;
    word-break: break-all;
}

/* ── Hash Rows ── */
.cert-hash-row {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--tblr-bg-surface-secondary, rgba(0, 0, 0, 0.03));
}

.cert-hash-row label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tblr-secondary);
    margin-bottom: 0.25rem;
}

.cert-hash-row .value {
    font-family: var(--tblr-font-monospace);
    font-size: 0.8125rem;
    word-break: break-all;
}

/* ── Publisher ── */
.cert-publisher {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--tblr-bg-surface-secondary, rgba(0, 0, 0, 0.03));
}

.cert-publisher-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tblr-secondary);
}

/* ── Footer ── */
.cert-footer {
    text-align: center;
    margin-top: 2rem;
    max-width: 640px;
    width: 100%;
}

.cert-footer p {
    color: var(--tblr-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

/* ── Governance badge ── */
.cert-governance {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.cert-governance--accepted {
    background: rgba(var(--tblr-success-rgb), 0.1);
    color: var(--tblr-success);
}

.cert-governance--pending {
    background: rgba(var(--tblr-warning-rgb), 0.1);
    color: var(--tblr-warning);
}

.cert-governance--refused {
    background: rgba(var(--tblr-danger-rgb), 0.1);
    color: var(--tblr-danger);
}
