* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f5;
    color: #18181b;
    line-height: 1.5;
}

.wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

header { text-align: center; padding: 8px 0 24px; }
.logo { max-width: 260px; width: 100%; height: auto; }

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    padding: 24px;
}

.notice { text-align: center; padding: 24px 8px; }
.notice h1 { font-size: 22px; margin-bottom: 8px; }
.notice p { color: #52525b; }
.paid-notice { border-top: 1px solid #e4e4e7; margin-top: 16px; }

.sale-head {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #52525b;
    margin-bottom: 12px;
}
.sale-ref { font-weight: bold; color: #18181b; }

.items { width: 100%; border-collapse: collapse; font-size: 14px; }
.items th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: #71717a;
    border-bottom: 1px solid #e4e4e7;
    padding: 6px 4px;
}
.items td { padding: 8px 4px; border-bottom: 1px solid #f4f4f5; }
.items .num { text-align: right; white-space: nowrap; }

.totals { margin-top: 12px; font-size: 14px; }
.totals div, .payments div { display: flex; justify-content: space-between; padding: 3px 4px; }
.totals .strong { font-weight: bold; font-size: 16px; border-top: 1px solid #e4e4e7; margin-top: 4px; padding-top: 8px; }

.payments { margin-top: 8px; font-size: 13px; color: #52525b; border-top: 1px dashed #e4e4e7; padding-top: 8px; }

.due-hero {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    background: #18181b;
    color: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 20px 0;
}
.due-hero strong { font-size: 26px; }

.field { margin-bottom: 14px; flex: 1; }
.field-row { display: flex; gap: 12px; }
.field label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 4px; }

.clover-el {
    border: 1px solid #d4d4d8;
    border-radius: 6px;
    background: #fff;
    height: 44px;
    padding: 2px 8px;
}

.err { color: #dc2626; font-size: 12px; min-height: 16px; margin-top: 2px; }

#pay-btn {
    width: 100%;
    background: #18181b;
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    border: 0;
    border-radius: 8px;
    padding: 14px;
    margin-top: 6px;
    cursor: pointer;
}
#pay-btn:hover:not(:disabled) { background: #3f3f46; }
#pay-btn:disabled { opacity: .6; cursor: default; }

#pay-root[data-state="processing"] #pay-btn::after { content: "…"; }

.pay-message { color: #dc2626; font-size: 14px; text-align: center; min-height: 20px; margin-top: 10px; }

.receipt { text-align: center; padding: 24px 8px; }
.receipt h1 { font-size: 22px; margin-bottom: 8px; }
.receipt p { color: #52525b; }

footer { text-align: center; font-size: 12px; color: #a1a1aa; padding-top: 20px; }

@media (max-width: 480px) {
    .field-row { flex-direction: column; gap: 0; }
    .card { padding: 16px; }
}
