:root {
    --ep-green: #00a859;
    --ep-green-dark: #007d42;
    --ep-green-light: #e6f7ef;
    --app-bg: #f3f6f8;
    --white: #ffffff;
    --text-dark: #0f172a;
    --text-gray: #64748b;
    --border-light: #e2e8f0;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: radial-gradient(circle at top, #e2e8f0, #cbd5e1);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-dark);
}

.app-shell {
    width: 100%;
    max-width: 425px;
    min-height: 100vh;
    background: var(--app-bg);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
    overflow-x: hidden;
}

@media (min-width: 480px) {
    .app-shell {
        min-height: 810px;
        max-height: 860px;
        border-radius: 38px;
        border: 7px solid #1e293b;
    }
}

.top-bar {
    background: var(--white);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.user-profile { display: flex; align-items: center; gap: 10px; }

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #00b862, #007d42);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0, 168, 89, 0.28);
}

.app-name { font-weight: 800; font-size: 0.96rem; display: flex; align-items: center; gap: 5px; }

.verified-tick {
    width: 16px;
    height: 16px;
    background: var(--ep-green);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.verified-tag { font-size: 0.72rem; color: var(--text-gray); font-weight: 600; margin-top: 1px; }

.uid-pill {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    padding: 6px 8px 6px 11px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.uid-pill:active { transform: scale(0.96); background: var(--ep-green-light); }
.uid-lbl { font-size: 0.62rem; color: var(--text-gray); font-weight: 700; }
.uid-val { font-family: monospace; font-size: 0.88rem; font-weight: 700; color: var(--text-dark); }

.copy-icon-box {
    width: 28px;
    height: 28px;
    background: var(--ep-green-light);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ep-green);
}

.balance-banner {
    margin: 16px 16px 0 16px;
    background: linear-gradient(135deg, #00b862 0%, #008245 55%, #006636 100%);
    border-radius: 24px;
    padding: 20px 22px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 28px -6px rgba(0, 168, 89, 0.4);
}

.card-glow-1 {
    position: absolute;
    right: -30px;
    top: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.bal-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; position: relative; z-index: 2; }
.bal-label-wrap { display: flex; align-items: center; gap: 8px; }
.bal-label { font-size: 0.82rem; opacity: 0.92; font-weight: 600; }

.eye-btn {
    background: rgba(255, 255, 255, 0.16);
    border: none;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.currency-badge {
    background: rgba(0, 0, 0, 0.22);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.live-dot { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; }
.bal-figure { font-size: 2.45rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 14px; position: relative; z-index: 2; }
.dollar-sign { font-size: 1.65rem; opacity: 0.9; margin-right: 2px; }

.bal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 10px;
    position: relative;
    z-index: 2;
}

.footer-pill { background: rgba(255, 255, 255, 0.18); padding: 2px 8px; border-radius: 10px; font-weight: 700; font-size: 0.68rem; }

.quick-actions-card {
    margin: 14px 16px;
    background: var(--white);
    border-radius: 22px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    border: 1px solid var(--border-light);
}

.action-tile {
    flex: 1;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    border-radius: 16px;
    transition: 0.2s;
}
.action-tile:active { transform: scale(0.96); }
.tile-icon { width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.green-bg { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #008546; }
.blue-bg { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #1d4ed8; }
.tile-title { font-weight: 800; font-size: 0.95rem; color: var(--text-dark); }
.tile-sub { font-size: 0.72rem; color: var(--text-gray); }
.divider-vertical { width: 1px; height: 56px; background: var(--border-light); }
.transactions-section {
    flex: 1;
    background: var(--white);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 20px 18px;
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sec-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sec-header h3 { font-size: 0.98rem; font-weight: 800; }
.sync-badge { font-size: 0.72rem; color: var(--ep-green-dark); background: var(--ep-green-light); padding: 4px 10px; border-radius: 20px; font-weight: 700; }
.tx-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }

.tx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
}

.tx-left { display: flex; align-items: center; gap: 12px; }
.tx-badge { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.tx-badge.in { background: #dcfce7; color: #008546; }
.tx-badge.out { background: #fee2e2; color: #dc2626; }
.tx-name { font-size: 0.9rem; font-weight: 700; color: var(--text-dark); }
.tx-meta { font-size: 0.72rem; color: var(--text-gray); font-family: monospace; margin-top: 2px; }
.tx-amt { font-weight: 800; font-size: 0.95rem; }
.tx-amt.in { color: var(--ep-green); }
.tx-amt.out { color: var(--text-dark); }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 100;
}
@media (min-width: 480px) { .modal-backdrop { align-items: center; } }
.modal-backdrop.active { display: flex; }

.bottom-sheet {
    width: 100%;
    max-width: 425px;
    background: var(--white);
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    padding: 12px 22px 28px 22px;
    box-shadow: 0 -15px 45px rgba(0, 0, 0, 0.25);
    animation: slideSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 480px) { .bottom-sheet { border-radius: 30px; margin: 16px; } }

.sheet-handle { width: 42px; height: 4px; background: #cbd5e1; border-radius: 10px; margin: 0 auto 14px auto; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sheet-header h3 { font-size: 1.15rem; font-weight: 800; }

.close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-gray);
}

.step-hint { font-size: 0.85rem; color: var(--text-gray); margin-bottom: 14px; font-weight: 500; }

.gateway-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #f59e0b;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.14);
}
.gateway-card:active { transform: scale(0.98); }
.gw-left { display: flex; align-items: center; gap: 14px; }
.binance-logo-box { width: 48px; height: 48px; background: #f0b90b; border-radius: 15px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(240, 185, 11, 0.35); }
.gw-name { font-weight: 800; font-size: 1.02rem; display: flex; align-items: center; gap: 6px; }
.instant-tag { background: #111827; color: #f0b90b; font-size: 0.62rem; padding: 2px 6px; border-radius: 6px; font-weight: 800; }
.gw-desc { font-size: 0.78rem; color: #78350f; font-weight: 600; margin-top: 2px; }
.gw-arrow { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center; color: #b45309; }

.qr-card { background: #f8fafc; border: 1.5px solid var(--border-light); border-radius: 20px; padding: 14px; text-align: center; margin-bottom: 14px; }
.qr-wrapper { background: #fff; padding: 10px; border-radius: 16px; width: fit-content; margin: 0 auto 8px auto; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.scan-caption { font-size: 0.76rem; color: var(--text-gray); font-weight: 700; }

.copy-id-row {
    background: var(--ep-green-light);
    border: 1.5px dashed var(--ep-green);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.small-lbl { font-size: 0.72rem; color: var(--ep-green-dark); font-weight: 700; }
.big-id { font-family: monospace; font-size: 1.2rem; font-weight: 800; color: var(--text-dark); }
.btn-copy-pill { background: var(--ep-green); color: var(--white); border: none; padding: 9px 14px; border-radius: 11px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }

.quick-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.quick-chips button { background: #f1f5f9; border: 1px solid #e2e8f0; padding: 7px; border-radius: 10px; font-size: 0.78rem; font-weight: 700; cursor: pointer; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 6px; }
.app-input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--border-light); border-radius: 14px; font-size: 1.05rem; font-weight: 700; outline: none; background: #f8fafc; }
.app-input:focus { border-color: var(--ep-green); background: var(--white); }
.mono-input { font-family: monospace; font-size: 0.92rem; }
.input-note, .avail-hint { display: block; font-size: 0.75rem; color: var(--text-gray); margin-top: 5px; }
.amount-pill-notice { background: var(--ep-green-light); color: var(--ep-green-dark); padding: 11px 14px; border-radius: 13px; font-size: 0.88rem; margin-bottom: 14px; display: flex; justify-content: space-between; }

.btn-primary-green {
    width: 100%;
    background: linear-gradient(135deg, #00b862, #008546);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px -4px rgba(0, 168, 89, 0.45);
}

.center-status { text-align: center; padding: 24px 10px; }
.loader-ring { width: 72px; height: 72px; border: 4px solid var(--ep-green-light); border-top-color: var(--ep-green); border-radius: 50%; margin: 0 auto 18px auto; animation: spin 0.85s linear infinite; }

.green-tick-circle {
    width: 86px;
    height: 86px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px auto;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.45);
    animation: popBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.center-status h4 { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.success-heading { color: #059669; }
.center-status p { font-size: 0.88rem; color: var(--text-gray); line-height: 1.45; }

.receipt-box { background: #f8fafc; border: 1.5px solid var(--border-light); border-radius: 18px; padding: 14px 16px; margin-bottom: 18px; }
.receipt-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 0.88rem; border-bottom: 1px dashed #cbd5e1; }
.receipt-row:last-child { border-bottom: none; }
.total-row { font-size: 1.05rem; padding-top: 12px; }
.mono-txt { font-family: monospace; }

.toast {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #0f172a;
    color: #fff;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.84rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 999;
    transition: 0.3s ease;
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.hidden { display: none !important; }

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes popBounce { 0% { transform: scale(0.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes slideSheet { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.orange-bg { background: linear-gradient(135deg, #ffedd5, #fed7aa); color: #c2410c; }
