/* === VERIFY PAGE === */

.vp-page {
    min-height: 100vh;
    background: var(--st);
    display: flex;
    flex-direction: column;
}

.vp-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    height: 52px;
    background: var(--ob2);
    border-bottom: 0.5px solid var(--ob4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--cpad-m);
}

@media (min-width: 768px) {
    .vp-topbar {
        padding: 0 var(--cpad-d);
    }
}

.vp-logo {
    font-family: var(--fs);
    font-size: 18px;
    letter-spacing: -0.4px;
    color: #F0EDE6;
    text-decoration: none;
}

.vp-logo em {
    font-style: italic;
    color: var(--v);
}

.vp-topbar-actions {
    display: flex;
    gap: var(--sp2);
    align-items: center;
}


/* === MAIN LAYOUT === */

.vp-main {
    flex: 1;
    padding-top: 52px;
    display: flex;
    flex-direction: column;
}

.vp-search-band {
    background: var(--ob2);
    padding: var(--sp8) 0 var(--sp10);
    border-bottom: 0.5px solid var(--ob4);
}

.vp-search-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 var(--cpad-m);
}

@media (min-width: 768px) {
    .vp-search-inner {
        padding: 0 var(--cpad-d);
    }
}

.vp-search-eyebrow {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    color: #6A6660;
    margin-bottom: var(--sp3);
}

.vp-search-heading {
    font-family: var(--fs);
    font-size: clamp(22px, 3vw, 30px);
    color: #F0EDE6;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: var(--sp6);
}

.vp-search-form {
    display: flex;
    gap: var(--sp2);
}

.vp-search-inp {
    flex: 1;
    min-height: var(--touch);
    padding: 0 14px;
    background: var(--ob3);
    border: 0.5px solid var(--ob4);
    border-radius: var(--r-md);
    font-family: var(--fn);
    font-size: var(--t-sm);
    color: #C8C4BC;
    outline: none;
    transition: border-color var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.vp-search-inp:focus {
    border-color: var(--v);
}

.vp-search-inp::placeholder {
    color: #4A4840;
}

.vp-search-divider {
    display: flex;
    align-items: center;
    gap: var(--sp3);
    margin: var(--sp4) 0;
}

.vp-search-divider-line {
    flex: 1;
    height: 0.5px;
    background: var(--ob4);
}

.vp-search-divider-text {
    font-size: var(--t-xs);
    color: #4A4840;
    flex-shrink: 0;
}

.vp-qr-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp2);
    width: 100%;
    min-height: var(--touch);
    background: var(--ob3);
    border: 0.5px solid var(--ob4);
    border-radius: var(--r-md);
    font-family: var(--fn);
    font-size: var(--t-sm);
    color: #8A8680;
    cursor: pointer;
    transition: border-color var(--ease), color var(--ease);
}

.vp-qr-btn:hover {
    border-color: var(--ob5);
    color: #C8C4BC;
}


/* === RESULT AREA === */

.vp-result-band {
    flex: 1;
    padding: var(--sp10) 0 var(--sp16);
}

.vp-result-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 var(--cpad-m);
}

@media (min-width: 768px) {
    .vp-result-inner {
        padding: 0 var(--cpad-d);
    }
}


/* === STATES === */

.vp-state-idle {
    text-align: center;
    padding: var(--sp16) var(--sp4);
}

.vp-state-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--sp4);
}

.vp-state-icon-idle {
    background: var(--st2);
    border: var(--border);
}

.vp-idle-heading {
    font-family: var(--fs);
    font-size: 18px;
    color: var(--ob);
    margin-bottom: var(--sp2);
}

.vp-idle-body {
    font-size: var(--t-sm);
    color: var(--mu);
    line-height: 1.7;
    max-width: 320px;
    margin: 0 auto;
}

.vp-loading {
    display: none;
    text-align: center;
    padding: var(--sp12) 0;
}

.vp-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--st3);
    border-top-color: var(--v);
    border-radius: 50%;
    animation: vp-spin 0.7s linear infinite;
    margin: 0 auto var(--sp3);
}

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

.vp-loading-text {
    font-size: var(--t-sm);
    color: var(--mu);
}


/* === RESULT CARD — VALID === */

.vp-result {
    display: none;
}

.vp-result-card {
    background: var(--wh);
    border: var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.vp-result-header {
    padding: var(--sp6);
    border-bottom: var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp4);
}

.vp-result-status {
    display: flex;
    align-items: center;
    gap: var(--sp3);
}

.vp-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vp-status-icon-valid {
    background: var(--ac-p);
    border: 1px solid var(--ac-b);
}

.vp-status-icon-revoked {
    background: var(--rv-p);
    border: 1px solid var(--rv-b);
}

.vp-status-icon-frozen {
    background: var(--fr-p);
    border: 1px solid var(--fr-b);
}

.vp-status-icon-expired {
    background: var(--ex-p);
    border: 1px solid var(--ex-b);
}

.vp-status-label {
    font-family: var(--fs);
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--ob);
    line-height: 1.2;
}

.vp-status-sub {
    font-size: var(--t-sm);
    color: var(--mu);
    margin-top: 3px;
}

.vp-verified-at {
    font-size: var(--t-xs);
    color: var(--mu-l);
    text-align: right;
    flex-shrink: 0;
}

.vp-result-body {
    padding: var(--sp6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp5);
}

@media (max-width: 520px) {
    .vp-result-body {
        grid-template-columns: 1fr;
    }
}

.vp-field-label {
    font-size: var(--t-xs);
    color: var(--mu);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.vp-field-value {
    font-size: 14px;
    color: var(--ob);
    font-weight: 500;
    line-height: 1.4;
}

.vp-field-value-mono {
    font-family: var(--fm);
    font-size: var(--t-xs);
    color: var(--mu);
    word-break: break-all;
    line-height: 1.6;
}

.vp-field-wide {
    grid-column: 1 / -1;
}


/* === INTEGRITY PANEL === */

.vp-integrity {
    background: var(--st);
    border-top: var(--border);
    padding: var(--sp5) var(--sp6);
}

.vp-integrity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp4);
}

.vp-integrity-title {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ob);
}

.vp-integrity-rows {
    display: flex;
    flex-direction: column;
    gap: var(--sp3);
}

.vp-integrity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp4);
    font-size: var(--t-sm);
}

.vp-check-label {
    color: var(--mu);
    flex-shrink: 0;
}

.vp-check-result {
    display: flex;
    align-items: center;
    gap: var(--sp1);
    font-weight: 500;
}

.vp-check-pass {
    color: var(--ac-i);
}

.vp-check-fail {
    color: var(--rv-i);
}

.vp-check-warn {
    color: var(--fr-i);
}

.vp-check-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vp-check-dot-pass {
    background: var(--ac-i);
}

.vp-check-dot-fail {
    background: var(--rv-i);
}

.vp-check-dot-warn {
    background: var(--fr-i);
}


/* === BLOCKCHAIN PROOF === */

.vp-blockchain {
    border-top: var(--border);
    padding: var(--sp5) var(--sp6);
}

.vp-blockchain-title {
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--mu);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: var(--sp3);
}

.vp-hash-block {
    background: var(--ob2);
    border-radius: var(--r-md);
    padding: var(--sp3) var(--sp4);
    display: flex;
    flex-direction: column;
    gap: var(--sp2);
}

.vp-hash-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp4);
    font-size: var(--t-xs);
}

.vp-hash-key {
    color: #6A6660;
    flex-shrink: 0;
    min-width: 80px;
}

.vp-hash-val {
    font-family: var(--fm);
    color: #A8A49C;
    word-break: break-all;
    text-align: right;
    line-height: 1.5;
}

.vp-hash-val-link {
    font-family: var(--fm);
    color: var(--v-d);
    word-break: break-all;
    text-align: right;
    line-height: 1.5;
    text-decoration: none;
    transition: color var(--ease);
}

.vp-hash-val-link:hover {
    color: var(--v-h);
}


/* === ISSUER PANEL === */

.vp-issuer-panel {
    border-top: var(--border);
    padding: var(--sp5) var(--sp6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp4);
    flex-wrap: wrap;
}

.vp-issuer-info {
    display: flex;
    align-items: center;
    gap: var(--sp3);
}

.vp-issuer-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    background: var(--st2);
    border: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fs);
    font-size: 11px;
    color: var(--mu);
    flex-shrink: 0;
    font-weight: 600;
}

.vp-issuer-name {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ob);
}

.vp-issuer-type {
    font-size: var(--t-xs);
    color: var(--mu);
    margin-top: 2px;
}


/* === ERROR CARD === */

.vp-error-card {
    background: var(--rv-p);
    border: 1px solid var(--rv-b);
    border-radius: var(--r-xl);
    padding: var(--sp8) var(--sp6);
    text-align: center;
}

.vp-error-icon {
    width: 48px;
    height: 48px;
    background: var(--rv-p);
    border: 1px solid var(--rv-b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--sp4);
}

.vp-error-title {
    font-family: var(--fs);
    font-size: 20px;
    color: var(--rv-i);
    margin-bottom: var(--sp2);
}

.vp-error-body {
    font-size: var(--t-sm);
    color: var(--mu);
    line-height: 1.7;
    max-width: 360px;
    margin: 0 auto var(--sp5);
}


/* === CTA PANEL === */

.vp-cta-panel {
    margin-top: var(--sp6);
    background: var(--ob2);
    border-radius: var(--r-xl);
    padding: var(--sp6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp5);
    flex-wrap: wrap;
}

.vp-cta-copy-title {
    font-family: var(--fs);
    font-size: 16px;
    color: #F0EDE6;
    margin-bottom: 4px;
}

.vp-cta-copy-body {
    font-size: var(--t-sm);
    color: #8A8480;
    line-height: 1.6;
    max-width: 320px;
}

.vp-cta-actions {
    display: flex;
    gap: var(--sp2);
    flex-wrap: wrap;
    flex-shrink: 0;
}


/* === QR SCANNER MODAL === */

.vp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(14, 14, 12, 0.8);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--sp4);
}

.vp-modal-backdrop.open {
    display: flex;
}

.vp-modal {
    background: var(--wh);
    border-radius: var(--r-xl);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: var(--shadow-modal);
}

.vp-modal-header {
    padding: var(--sp4) var(--sp5);
    border-bottom: var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vp-modal-title {
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--ob);
}

.vp-modal-close {
    width: var(--touch-sm);
    height: var(--touch-sm);
    background: none;
    border: none;
    color: var(--mu);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: background var(--ease), color var(--ease);
}

.vp-modal-close:hover {
    background: var(--st2);
    color: var(--ob);
}

.vp-modal-body {
    padding: var(--sp6);
    text-align: center;
}

.vp-scanner-viewport {
    width: 100%;
    aspect-ratio: 1;
    background: var(--ob);
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: var(--sp4);
}

.vp-scanner-frame {
    position: absolute;
    inset: 20px;
    border: 1.5px solid var(--v);
    border-radius: var(--r-md);
}

.vp-scanner-frame::before,
.vp-scanner-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--v);
    border-style: solid;
}

.vp-scanner-frame::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
    border-radius: 3px 0 0 0;
}

.vp-scanner-frame::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 3px 0;
}

.vp-scanner-line {
    position: absolute;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--v-d), transparent);
    animation: scan-line 2s ease-in-out infinite;
}

@keyframes scan-line {
    0% {
        top: 20px;
        opacity: 1;
    }

    50% {
        top: calc(100% - 20px);
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 1;
    }
}

.vp-scanner-placeholder {
    font-size: var(--t-sm);
    color: #4A4840;
    z-index: 1;
}

.vp-modal-hint {
    font-size: var(--t-xs);
    color: var(--mu);
    line-height: 1.6;
}


/* === HISTORY STRIP === */

.vp-history-strip {
    margin-top: var(--sp8);
    padding-top: var(--sp6);
    border-top: var(--border);
}

.vp-history-title {
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--mu);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: var(--sp4);
}

.vp-history-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp2);
}

.vp-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp4);
    padding: var(--sp3) var(--sp4);
    background: var(--wh);
    border: var(--border);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: border-color var(--ease), box-shadow var(--ease);
}

.vp-history-item:hover {
    border-color: var(--st4);
    box-shadow: var(--shadow-card);
}

.vp-history-id {
    font-family: var(--fm);
    font-size: var(--t-xs);
    color: var(--mu);
}

.vp-history-name {
    font-size: var(--t-sm);
    color: var(--ob);
    font-weight: 500;
}

.vp-history-time {
    font-size: var(--t-xs);
    color: var(--mu-l);
    flex-shrink: 0;
}


/* === RESPONSIVE === */

@media (max-width: 480px) {
    .vp-search-form {
        flex-direction: column;
    }

    .vp-cta-panel {
        flex-direction: column;
        align-items: flex-start;
    }
}