/* =========================================================
   WORN BANK — MAIN WEBSITE
========================================================= */

:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-soft: #fafbfc;

    --text: #17181b;
    --muted: #747880;

    --border: #e3e5e9;
    --border-focus: #8c9098;

    --dark: #17181b;
    --dark-hover: #292b30;

    --paypal: #0070ba;
    --paypal-hover: #005ea6;

    --success: #16834b;
    --success-bg: #edf8f2;

    --shadow: 0 15px 45px rgba(0, 0, 0, 0.06);

    --radius: 14px;
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

input,
select,
textarea {
    outline: none;
}

.hidden {
    display: none !important;
}


/* =========================================================
   TOP BAR
========================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;

    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 42px;

    background: rgba(255, 255, 255, 0.96);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;

    gap: 10px;

    color: var(--text);

    font-size: 20px;
    font-weight: 800;

    letter-spacing: -0.6px;
}

.brand-mark {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: var(--dark);
    color: white;

    font-size: 15px;
    font-weight: 800;
}

.login-button {
    height: 40px;

    padding: 0 18px;

    border: 1px solid #d7d9dd;
    border-radius: 8px;

    background: white;
    color: var(--text);

    font-size: 12px;
    font-weight: 700;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.login-button:hover {
    background: #f8f8f9;
    border-color: #c8cbd0;
}


/* =========================================================
   MAIN CONTAINER
========================================================= */

main {
    min-height: calc(100vh - 72px);
}

.screen {
    display: none;

    width: 100%;

    padding: 55px 20px 80px;
}

.screen.active {
    display: block;
}


/* =========================================================
   STEP 1 — PAYMENT REQUEST
========================================================= */

.payment-card {
    width: 100%;
    max-width: 620px;

    margin: 25px auto 0;

    padding: 38px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: var(--surface);

    box-shadow: var(--shadow);
}

.payment-header {
    margin-bottom: 34px;
}

.payment-header h1 {
    margin: 0 0 8px;

    font-size: 25px;
    line-height: 1.25;

    letter-spacing: -0.8px;
}

.payment-header p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.6;
}

.sender {
    display: flex;
    align-items: center;

    gap: 13px;

    margin-bottom: 28px;
}

.avatar {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eceef1;

    font-size: 14px;
    font-weight: 800;
}

.sender strong {
    display: block;

    font-size: 13px;
}

.sender span {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 11px;
}

.amount {
    margin-bottom: 30px;
}

.amount span {
    display: block;

    margin-bottom: 7px;

    color: var(--muted);

    font-size: 11px;
}

.amount strong {
    display: block;

    font-size: 42px;
    line-height: 1;

    letter-spacing: -2px;
}

.details {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    margin-bottom: 28px;

    border: 1px solid var(--border);
    border-radius: 10px;

    overflow: hidden;
}

.details > div {
    padding: 14px;

    border-right: 1px solid var(--border);
}

.details > div:last-child {
    border-right: 0;
}

.details span {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);

    font-size: 9px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.details strong {
    display: block;

    font-size: 11px;
}

.primary-button {
    width: 100%;
    height: 50px;

    border: 0;
    border-radius: 9px;

    background: var(--dark);
    color: white;

    font-size: 13px;
    font-weight: 700;

    transition:
        background 0.15s ease,
        transform 0.1s ease;
}

.primary-button:hover {
    background: var(--dark-hover);
}

.primary-button:active {
    transform: translateY(1px);
}

.small-text {
    margin: 14px 0 0;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.5;

    text-align: center;
}


/* =========================================================
   STEP 2 — RECIPIENT FORM
========================================================= */

.form-layout {
    width: 100%;
    max-width: 1000px;

    display: grid;

    grid-template-columns: 310px minmax(0, 1fr);

    gap: 20px;

    margin: 25px auto 0;
}

.side-summary {
    height: fit-content;

    padding: 25px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--surface);
}

.side-summary span {
    display: block;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.side-summary h2 {
    margin: 0 0 22px;

    font-size: 29px;

    letter-spacing: -1px;
}

.side-summary .summary-row {
    display: flex;
    justify-content: space-between;

    padding: 12px 0;

    border-top: 1px solid var(--border);

    font-size: 11px;
}

.side-summary .summary-row span {
    margin: 0;

    text-transform: none;
    letter-spacing: 0;

    font-weight: 400;
}

.side-summary .summary-row strong {
    font-size: 11px;
}

.form-card {
    padding: 31px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--surface);

    box-shadow: var(--shadow);
}

.section-title {
    margin-bottom: 23px;
}

.section-title h2 {
    margin: 0 0 6px;

    font-size: 19px;

    letter-spacing: -0.4px;
}

.section-title p {
    margin: 0;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.5;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;

    margin-bottom: 7px;

    color: #3e4147;

    font-size: 11px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;

    min-height: 48px;

    padding: 0 13px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: white;

    color: var(--text);

    font-size: 12px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.field textarea {
    min-height: 90px;

    padding-top: 13px;
    padding-bottom: 13px;

    resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: #c8cbd0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--border-focus);

    box-shadow:
        0 0 0 3px rgba(23, 24, 27, 0.05);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #a1a4aa;
}

.two-column {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;
}

.three-column {
    display: grid;

    grid-template-columns: 1.2fr 1fr 0.8fr;

    gap: 14px;
}

.form-divider {
    height: 1px;

    margin: 27px 0;

    background: var(--border);
}

.destination-heading {
    margin-bottom: 17px;
}

.destination-heading h3 {
    margin: 0 0 5px;

    font-size: 14px;
}

.destination-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.5;
}

.destination-field {
    position: relative;
}

.destination-prefix {
    position: absolute;

    left: 13px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--muted);

    font-size: 11px;

    pointer-events: none;
}

.destination-field input {
    padding-left: 45px;
}

.submit-details {
    margin-top: 8px;
}


/* =========================================================
   STEP 3 — ACCOUNT CONFIRMATION
========================================================= */

#screen3 {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 70vh;
    padding: 40px 20px;
}

#screen3.active {
    display: flex;
}

.paypal-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.08),
        0 3px 10px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

/* Header */

.paypal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 76px;
    padding: 0 32px;
    border-bottom: 1px solid #eeeeee;
}

.paypal-logo {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #003087;
}

/* Main content */

.paypal-content {
    padding: 38px 40px 32px;
}

.paypal-heading {
    text-align: center;
    margin-bottom: 32px;
}

.paypal-label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.paypal-heading h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #111827;
}

.paypal-heading p {
    max-width: 320px;
    margin: 10px auto 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}

/* Form */

.paypal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.paypal-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.paypal-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.paypal-field input {
    width: 100%;
    height: 52px;
    padding: 0 15px;

    box-sizing: border-box;

    border: 1px solid #cfd4dc;
    border-radius: 8px;

    background: #ffffff;
    color: #111827;

    font-family: inherit;
    font-size: 15px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.paypal-field input::placeholder {
    color: #9ca3af;
}

.paypal-field input:hover {
    border-color: #9aa3af;
}

.paypal-field input:focus {
    border-color: #0070ba;
    box-shadow: 0 0 0 3px rgba(0, 112, 186, 0.12);
}

/* Button */

.paypal-button {
    width: 100%;
    height: 52px;
    margin-top: 4px;

    border: 0;
    border-radius: 26px;

    background: #0070ba;
    color: #ffffff;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.paypal-button:hover {
    background: #005ea6;
    box-shadow: 0 5px 14px rgba(0, 112, 186, 0.18);
}

.paypal-button:active {
    transform: translateY(1px);
}

/* Bottom information */

.paypal-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    margin-top: 28px;
    padding-top: 24px;

    border-top: 1px solid #eeeeee;
}

.paypal-help {
    color: #0070ba;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.paypal-help:hover {
    text-decoration: underline;
}

.paypal-security {
    font-size: 12px;
    color: #9ca3af;
}

/* Mobile */

@media (max-width: 520px) {

    #screen3 {
        padding: 24px 14px;
    }

    .paypal-card {
        border-radius: 14px;
    }

    .paypal-header {
        height: 68px;
    }

    .paypal-content {
        padding: 30px 24px 26px;
    }

    .paypal-heading h2 {
        font-size: 22px;
    }

}

/* =========================================================
   STEP 4 — COMPLETE
========================================================= */

.complete-card {
    width: 100%;
    max-width: 540px;

    margin: 25px auto;

    padding: 40px;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: white;

    text-align: center;

    box-shadow: var(--shadow);
}

.success-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 20px;

    border-radius: 50%;

    background: var(--success-bg);
    color: var(--success);

    font-size: 21px;
    font-weight: 800;
}

.complete-card h2 {
    margin: 0 0 8px;

    font-size: 23px;

    letter-spacing: -0.6px;
}

.complete-card > p {
    margin: 0 0 28px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.6;
}

.receipt {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 10px;

    text-align: left;
}

.receipt-row {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    padding: 13px 15px;

    border-bottom: 1px solid var(--border);
}

.receipt-row:last-child {
    border-bottom: 0;
}

.receipt-row span {
    color: var(--muted);

    font-size: 10px;
}

.receipt-row strong {
    font-size: 11px;

    text-align: right;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    padding: 25px 20px 35px;

    color: #9a9da3;

    font-size: 9px;

    text-align: center;
}


/* =========================================================
   LOGIN / REGISTER MODAL
========================================================= */

.auth-modal {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.auth-backdrop {
    position: absolute;

    inset: 0;

    background: rgba(15, 16, 18, 0.46);

    backdrop-filter: blur(5px);
}

.auth-card {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 430px;

    padding: 30px;

    border-radius: 16px;

    background: white;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.18);
}

.auth-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 24px;
}

.auth-header h2 {
    margin: 0 0 6px;

    font-size: 21px;

    letter-spacing: -0.5px;
}

.auth-header p {
    margin: 0;

    color: var(--muted);

    font-size: 11px;
}

.auth-close {
    width: 32px;
    height: 32px;

    border: 0;
    border-radius: 8px;

    background: #f1f2f4;

    color: #55585e;

    font-size: 19px;
}

.auth-close:hover {
    background: #e8e9eb;
}

.auth-tabs {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 4px;

    margin-bottom: 23px;

    padding: 4px;

    border-radius: 9px;

    background: #f0f1f3;
}

.auth-tab {
    height: 36px;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: var(--muted);

    font-size: 11px;
    font-weight: 700;
}

.auth-tab.active {
    background: white;
    color: var(--text);

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;

    margin-bottom: 7px;

    font-size: 11px;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    height: 48px;

    padding: 0 13px;

    border: 1px solid var(--border);
    border-radius: 8px;

    font-size: 12px;

    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}

.auth-field input:focus {
    border-color: #92969d;

    box-shadow:
        0 0 0 3px rgba(23, 24, 27, 0.05);
}

.auth-submit {
    width: 100%;
    height: 48px;

    margin-top: 5px;

    border: 0;
    border-radius: 8px;

    background: var(--dark);
    color: white;

    font-size: 12px;
    font-weight: 700;
}

.auth-submit:hover {
    background: var(--dark-hover);
}

.auth-admin {
    width: 100%;

    margin-top: 17px;
    padding-top: 17px;

    border-top: 1px solid var(--border);

    background: none;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;

    color: var(--muted);

    font-size: 10px;
}

.auth-admin:hover {
    color: var(--text);
}

.auth-note {
    margin: 15px 0 0;

    color: #92959b;

    font-size: 9px;
    line-height: 1.5;

    text-align: center;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 850px) {

    .topbar {
        padding: 0 20px;
    }

    .form-layout {
        grid-template-columns: 1fr;
    }

    .side-summary {
        order: 2;
    }

    .form-card {
        order: 1;
    }
}


@media (max-width: 600px) {

    .screen {
        padding: 30px 14px 55px;
    }

    .payment-card,
    .form-card,
    .paypal-card,
    .complete-card {
        padding: 23px;
    }

    .payment-card {
        margin-top: 10px;
    }

    .amount strong {
        font-size: 34px;
    }

    .details {
        grid-template-columns: 1fr;
    }

    .details > div {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .details > div:last-child {
        border-bottom: 0;
    }

    .two-column,
    .three-column {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .paypal-divider {
        margin-left: -23px;
        margin-right: -23px;
    }

    .auth-card {
        padding: 24px;
    }
}