:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --card-soft: #f8fafc;
    --text: #172033;
    --muted: #64748b;
    --border: #dbe4f0;
    --primary: #1d4ed8;
    --primary-dark: #163ea8;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    --radius: 0px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
    color: var(--text);
}

body.modal-open {
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.page-shell {
    width: min(100%, 960px);
    margin: 0 auto;
    padding: 28px 16px 48px;
}

.brand {
    font-size: 15px;
    font-weight: bold;
    color: #e76916;

}

.trust-card,
.form-card,
.success-card {
    background: var(--card);
    border: 1px solid rgba(219, 228, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.trust-card {
    margin-bottom: 0px;
    overflow: hidden;
    border:1px solid transparent;
    box-shadow: 0;
}

.trust-card-inner {
    padding: 26px 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
}

.trust-card-inner h1 {
    margin: 0 0 14px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: 0.4px;
}

.trust-card-inner p {
    margin: 6px 0;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}

.form-card {
    padding: 28px 24px;
}

.success-card {
    padding: 42px 24px;
    text-align: center;
}

.success-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
    font-size: 36px;
    font-weight: 700;
}

.success-card h2 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.25;
}

.success-card p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.success-ref {
    margin-top: 14px !important;
    font-size: 15px;
    color: var(--text) !important;
}

.section-title-wrap {
    margin-bottom: 18px;
}

.section-title-wrap.compact-top {
    margin-top: 24px;
}

.section-title-wrap h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.2;
}

.section-title-wrap p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.compact-grid {
    gap: 16px;
}

.grid-full {
    grid-column: 1 / -1;
}

label {
    display: block;
}

label span {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card-soft);
    color: var(--text);
    font-size: 15px;
    padding: 14px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="file"] {
    padding: 12px 14px;
    background: #fff;
}

textarea {
    resize: vertical;
    min-height: 110px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(29, 78, 216, 0.6);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.08);
    background: #fff;
}

.amount-row {
    align-items: end;
}

.action-box {
    display: flex;
    align-items: end;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    width: 100%;
    padding: 14px 22px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.inline-btn {
    width: auto;
    min-width: 220px;
    margin-top: 14px;
}

.form-message {
    margin-top: 14px;
    min-height: 24px;
    font-size: 14px;
    line-height: 1.5;
}

.form-message.error {
    color: var(--danger);
}

.form-message.success {
    color: var(--success);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.payment-modal {
    position: relative;
    width: min(100%, 480px);
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 24px 24px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #eef2ff;
    color: #0f172a;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.payment-modal h3 {
    margin: 0 0 8px;
    font-size: 27px;
    line-height: 1.2;
}

.modal-copy {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.payment-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #fde68a;
    border-radius: 16px;
    background: #fffbea;
    text-align: left;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    animation: pulse 1.4s infinite;
    flex: 0 0 auto;
}

.payment-alert-text {
    font-size: 14px;
    line-height: 1.5;
    color: #7c5b00;
}

.timer-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 15px;
    font-weight: 700;
}

.qr-wrap {
    width: min(86vw, 300px);
    margin: 0 auto 16px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #ffffff;
    padding: 14px 14px 18px;
    box-sizing: border-box;
    box-shadow: 0 18px 40px rgba(15, 52, 96, 0.08);
}

.qr-stage {
    width: min(72vw, 260px);
    height: min(72vw, 260px);
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.payment-qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 18px;
    background: #ffffff;
}

.qr-wrap.qr-ready .payment-qr-image {
    opacity: 1;
}

.qr-loader {
    width: 46px;
    height: 46px;
    border: 4px solid #dbeafe;
    border-top-color: #2d5bdb;
    border-radius: 50%;
    animation: qrSpin 0.85s linear infinite;
    position: absolute;
    z-index: 2;
}

.qr-wrap.qr-ready .qr-loader,
.qr-wrap.qr-error .qr-loader {
    display: none;
}

.qr-reload-btn {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    border: 0;
    border-radius: 10px;
    background: #eef4ff;
    color: #2347a3;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(35, 71, 163, 0.14);
    z-index: 3;
}

.qr-reload-btn.hidden {
    display: none;
}

@keyframes qrSpin {
    to {
        transform: rotate(360deg);
    }
}

.qr-missing {
    font-size: 14px;
    color: var(--danger);
    line-height: 1.6;
}

.amount-preview {
    margin: 12px 0;
    font-size: 18px;
    color: var(--text);
}

.amount-preview strong {
    font-size: 24px;
    color: var(--primary-dark);
}

.modal-note {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

@media (max-width: 768px) {
    .page-shell {
        padding: 16px 12px 30px;
    }

    .form-card,
    .success-card,
    .payment-modal {
        padding-left: 18px;
        padding-right: 18px;
    }

    .trust-card-inner {
        padding: 22px 18px;
    }

    .trust-card-inner h1 {
        font-size: 24px;
    }

    .section-title-wrap h2,
    .success-card h2,
    .payment-modal h3 {
        font-size: 22px;
    }

    .grid-two {
        grid-template-columns: 1fr;
    }

    .inline-btn {
        width: 100%;
        min-width: 0;
    }
}

.upload-preview {
            margin-top: 10px;
            padding: 12px;
            border: 1px solid #d9e2f1;
            border-radius: 12px;
            background: #f8fbff;
        }

        .upload-preview.hidden {
            display: none;
        }

        .upload-preview img {
            display: block;
            width: 100%;
            max-width: 220px;
            height: auto;
            border-radius: 10px;
            border: 1px solid #d9e2f1;
            background: #ffffff;
        }

        .upload-preview .preview-title {
            display: inline-block;
            margin-bottom: 8px;
            font-size: 13px;
            font-weight: 600;
            color: #234;
        }

        .upload-preview .preview-file {
            display: block;
            padding: 12px 14px;
            border-radius: 10px;
            background: #ffffff;
            border: 1px dashed #b9c7dd;
            color: #234;
            font-size: 14px;
            word-break: break-word;
        }

        .upi-action {
            margin-top: 14px;
            text-align: center;
        }

        .upi-action .inline-btn {
            display: inline-flex;
            justify-content: center;
            align-items: center;
            min-width: 180px;
        }

.d-note p {
   background: linear-gradient(135deg, #fff8f0 0%, #fff2f2 100%);
    font-size: 12px;
    margin-bottom: 5px;
    padding: 5px;
    color: #d60000;
    border: 1px solid;
    border-radius: 9px;
    line-height: 1;
    border-left: 3px solid;
    font-family: monospace;
}

.login-status-card {
    background: rgba(255,255,255,.95);
    box-shadow: 0 18px 50px rgba(17,24,39,.08);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.login-status-card span {
    display: block;
    color: #667085;
    font-size: 14px;
    margin-top: 4px;
}
.login-status-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.login-status-actions a,
.profile-mini a {
    background: #edf3ff;
    color: #1d43a5;
    padding: 10px 13px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}
.login-choice-modal {
    text-align: center;
    max-width: 520px;
}
.login-choice-modal h2 {
    margin: 0 0 10px;
}
.login-choice-modal p {
    color: #53627a;
    line-height: 1.65;
}
.login-choice-actions {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}
.secondary-btn-inline {
    border: 0;
    background: #f0f4fb;
    color: #26354d;
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 800;
    cursor: pointer;
}
.google-login-btn {
    display: block;
    text-align: center;
}
.profile-mini {
    margin-top: 18px;
    display: grid;
    gap: 8px;
    background: #f8fbff;
    border: 1px solid #e6ecf7;
    border-radius: 18px;
    padding: 14px;
}
.profile-mini span {
    color: #526174;
}
.public-table-wrap {
    overflow-x: auto;
}
.public-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
.public-table th,
.public-table td {
    padding: 13px;
    border-bottom: 1px solid #e6ecf2;
    text-align: left;
}
.public-table th {
    background: #f5f8fc;
    font-size: 13px;
    color: #5b6678;
}
.public-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 800;
    font-size: 12px;
}
.public-badge.under_review { background: #fff4df; color: #9a630d; }
.public-badge.verified { background: #eaf8ef; color: #0f7d42; }
.public-badge.rejected { background: #ffefed; color: #b3261e; }
@media (max-width: 720px) {
    .login-status-card {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Google login UX update */
.google-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    border: 1px solid #dadce0;
    border-radius: 14px;
    background: #ffffff;
    color: #202124;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(60, 64, 67, 0.08);
    transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.google-login-btn:hover {
    background: #f8fbff;
    box-shadow: 0 14px 28px rgba(60, 64, 67, 0.14);
    transform: translateY(-1px);
}

.google-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23FFC107' d='M43.611 20.083H42V20H24v8h11.303C33.652 32.657 29.223 36 24 36c-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z'/%3E%3Cpath fill='%23FF3D00' d='M6.306 14.691l6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z'/%3E%3Cpath fill='%234CAF50' d='M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238C29.211 35.091 26.715 36 24 36c-5.202 0-9.619-3.317-11.285-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z'/%3E%3Cpath fill='%231976D2' d='M43.611 20.083H42V20H24v8h11.303c-.793 2.237-2.231 4.166-4.087 5.571l6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z'/%3E%3C/svg%3E");
}

.login-choice-actions .google-login-btn {
    width: 100%;
}

.guest-login-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #dbe7ff;
    background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
    box-shadow: 0 12px 28px rgba(29, 78, 216, 0.08);
}

.guest-login-copy {
    display: grid;
    gap: 5px;
}

.guest-login-copy strong {
    font-size: 16px;
    color: #172033;
}

.guest-login-copy span {
    font-size: 14px;
    color: #64748b;
    line-height: 1.45;
}

.google-login-btn-small {
    width: auto;
    min-width: 210px;
    flex: 0 0 auto;
}

.guest-reminder-modal {
    max-width: 500px;
}

.guest-reminder-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ffffff;
    border: 1px solid #dadce0;
    color: #4285f4;
    font-size: 28px;
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(60, 64, 67, 0.12);
}

.guest-reminder-modal h2 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.2;
}

.guest-reminder-modal p {
    margin: 0;
    color: #53627a;
    font-size: 15px;
    line-height: 1.65;
}

.guest-reminder-actions {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.guest-reminder-actions .secondary-btn-inline {
    width: 100%;
    background:linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color:#fff;
}

@media (max-width: 720px) {
    .guest-login-card {
        align-items: stretch;
        flex-direction: column;
    }

    .google-login-btn-small {
        width: 100%;
        min-width: 0;
    }
}
