/*
 * Payment Verification - Precision Banking Design
 * Ultra-clean, high-contrast, single-accent
 */

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;

    --accent: #10b981;
    --accent-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --error: #ef4444;
    --error-light: #fee2e2;

    --font-sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    --radius: 8px;
    --transition: 120ms ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 440px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 40px 0 32px;
    text-align: center;
}

.header-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

/* Content */
.content {
    flex: 1;
    padding: 24px 0;
}

/* Sections */
.section {
    margin-bottom: 24px;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Wallet Section */
.wallet-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.qr {
    width: 88px;
    height: 88px;
    border-radius: var(--radius);
    flex-shrink: 0;
    overflow: hidden;
}

.qr img,
.qr canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.wallet-info {
    flex: 1;
    min-width: 0;
}

.wallet-chain {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.chain-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.wallet-addr {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-900);
    background: var(--gray-50);
    padding: 10px 12px;
    border-radius: var(--radius);
    word-break: break-all;
    line-height: 1.6;
    margin-bottom: 10px;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--gray-900);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-copy:hover {
    background: var(--black);
}

.btn-copy:active {
    transform: scale(0.98);
}

.btn-copy.copied {
    background: var(--accent);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--gray-100);
    margin: 24px 0;
}

/* Form */
.field {
    margin-bottom: 16px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--gray-900);
    transition: all var(--transition);
}

.field input.mono {
    font-family: var(--font-mono);
    font-size: 13px;
}

.field input::placeholder {
    color: var(--gray-400);
}

.field input:hover {
    border-color: var(--gray-300);
}

.field input:focus {
    outline: none;
    border-color: var(--gray-900);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.field-note {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--gray-500);
}

/* Transaction Inline Panel */
.tx-inline {
    margin: 16px 0 24px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.tx-inline .tx-amount-row {
    margin-bottom: 12px;
}

.tx-inline .tx-meta {
    margin-bottom: 12px;
}

.tx-inline .tx-amount {
    font-size: 24px;
}

.tx-header {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tx-recipient-pill {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--gray-100);
    color: var(--gray-600);
}

.tx-recipient-pill.ok {
    background: var(--accent-light);
    color: #059669;
}

.tx-recipient-pill.warning {
    background: var(--error-light);
    color: #dc2626;
}

/* Transaction Section */
.tx-status-pill {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--gray-100);
    color: var(--gray-600);
}

.tx-status-pill.success {
    background: var(--accent-light);
    color: #059669;
}

.tx-status-pill.pending {
    background: var(--warning-light);
    color: #b45309;
}

.tx-status-pill.failed {
    background: var(--error-light);
    color: #dc2626;
}

.tx-status-pill.verifying {
    background: var(--gray-100);
    color: var(--gray-600);
    position: relative;
    overflow: hidden;
}

.tx-status-pill.verifying::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.tx-inline.loading {
    opacity: 0.8;
}

.tx-inline.loading .meta-value {
    color: var(--gray-400);
}

.tx-amount-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.tx-amount {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--gray-900);
}

.tx-token {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
}

.tx-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.tx-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
}

.meta-value {
    font-size: 13px;
    color: var(--gray-900);
}

.meta-value.mono {
    font-family: var(--font-mono);
    font-size: 11px;
}

.meta-value.ok {
    color: var(--accent);
    font-weight: 500;
}

.meta-value.warning {
    color: var(--error);
    font-weight: 500;
}

.tx-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-900);
    text-decoration: none;
    transition: color var(--transition);
}

.tx-link:hover {
    color: var(--accent);
}

/* Warnings */
.tx-warnings {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--warning-light);
    border-radius: var(--radius);
    border-left: 3px solid var(--warning);
}

.warning-item {
    font-size: 12px;
    color: #92400e;
    margin-bottom: 4px;
}

.warning-item:last-child {
    margin-bottom: 0;
}

/* Submit */
.btn-submit {
    width: 100%;
    padding: 14px 20px;
    background: var(--gray-900);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-submit:hover:not(:disabled) {
    background: var(--black);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: var(--gray-200);
    color: var(--gray-400);
    cursor: not-allowed;
}

.submit-msg {
    text-align: center;
    font-size: 12px;
    margin-top: 12px;
}

.submit-msg.error {
    color: var(--error);
}

.submit-msg.success {
    color: var(--accent);
}

/* Success / Receipt */
.section-success {
    padding: 0;
    background: transparent;
    border-radius: var(--radius);
}

.receipt-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.receipt-header {
    text-align: center;
    padding: 28px 24px 20px;
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--white) 100%);
}

.success-check {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-heading {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: var(--gray-900);
}

.receipt-timestamp {
    font-size: 12px;
    color: var(--gray-500);
}

.receipt-amount-section {
    text-align: center;
    padding: 20px 24px;
    background: var(--gray-50);
}

.receipt-amount-section .receipt-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.receipt-amount {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--gray-900);
}

.receipt-token {
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-500);
    margin-left: 6px;
}

.receipt-divider {
    height: 1px;
    background: var(--gray-200);
}

.receipt-details {
    padding: 20px 24px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.receipt-row:last-child {
    border-bottom: none;
}

.receipt-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    flex-shrink: 0;
}

.receipt-value {
    font-size: 13px;
    color: var(--gray-900);
    text-align: right;
    word-break: break-all;
    margin-left: 16px;
}

.receipt-status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.receipt-status-badge.success {
    background: var(--accent-light);
    color: #059669;
}

.receipt-status-badge.pending {
    background: var(--warning-light);
    color: #b45309;
}

.receipt-footer {
    text-align: center;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--gray-100);
}

.receipt-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-900);
    text-decoration: none;
}

.receipt-link:hover {
    color: var(--accent);
}

/* Footer */
.footer {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--gray-100);
}

.footer span {
    font-size: 11px;
    color: var(--gray-400);
    letter-spacing: 0.02em;
}

/* Utilities */
.hidden {
    display: none !important;
}

.mono {
    font-family: var(--font-mono);
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--gray-900);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 480px) {
    .wallet-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .wallet-info {
        width: 100%;
    }

    .btn-copy {
        width: 100%;
        justify-content: center;
    }

    .tx-meta {
        grid-template-columns: 1fr;
    }
}
