/* ===========================
   TApp Up Pay - Main Styles
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --blue-dark: #1a3a8f;
    --blue-mid: #2563eb;
    --blue-light: #38bdf8;
    --green-primary: #22c55e;
    --green-dark: #16a34a;
    --green-gradient: linear-gradient(135deg, #22c55e, #16a34a);
    --blue-gradient: linear-gradient(135deg, #1a3a8f, #2563eb, #38bdf8);
    --bg-gradient: linear-gradient(160deg, #c8e8ff 0%, #e8f4ff 40%, #f0f8ff 70%, #d4f1e4 100%);
    --card-bg: rgba(255, 255, 255, 0.92);
    --card-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
    --text-dark: #0f2057;
    --text-mid: #334e8c;
    --text-light: #6b8cc7;
    --border-color: rgba(37, 99, 235, 0.12);
    --danger: #ef4444;
    --success: #22c55e;
    --input-bg: rgba(255, 255, 255, 0.9);
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
}

/* ===========================
   PHONE MOCKUP WRAPPER
   =========================== */
.phone-wrapper {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    background: var(--bg-gradient);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Sky/cloud decorative background */
.phone-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 220px;
    background: linear-gradient(180deg, 
        rgba(186, 225, 255, 0.9) 0%, 
        rgba(220, 240, 255, 0.6) 60%, 
        transparent 100%);
    z-index: 0;
    border-radius: 0 0 60% 60%;
}

/* ===========================
   STATUS BAR
   =========================== */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 6px;
    position: relative;
    z-index: 10;
}

.status-time {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.status-icons {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: var(--text-dark);
}

.status-icons svg {
    width: 16px;
    height: 16px;
    fill: var(--text-dark);
}

/* ===========================
   HEADER / LOGO AREA
   =========================== */
.app-header {
    text-align: center;
    padding: 32px 20px 20px;
    position: relative;
    z-index: 10;
}

.app-header .logo-img {
    height: 64px;
    object-fit: contain;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.2));
}

/* ===========================
   AUTH PAGES (LOGIN / SIGNUP)
   =========================== */
.auth-container {
    flex: 1;
    padding: 0 24px 32px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 13.5px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* Input Fields */
.input-group {
    margin-bottom: 14px;
    position: relative;
}

.input-field {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 15px 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-field:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.input-field input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    min-width: 0;
}

.input-field input::placeholder {
    color: #a0b4d6;
}

.mobile-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
    transition: var(--transition);
}

.mobile-input-wrapper:focus-within {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.flag-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    padding: 0;
    flex-shrink: 0;
}

.country-code {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.divider-line {
    width: 1.5px;
    height: 22px;
    background: var(--border-color);
    flex-shrink: 0;
}

.mobile-input-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    min-width: 0;
}

.mobile-input-wrapper input::placeholder {
    color: #a0b4d6;
}

.input-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--text-light);
    padding: 0;
    flex-shrink: 0;
    transition: var(--transition);
}

.input-icon-btn:hover { color: var(--blue-mid); }

.password-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
    transition: var(--transition);
}

.password-wrapper:focus-within {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.password-wrapper svg {
    color: var(--text-light);
    flex-shrink: 0;
}

.password-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    min-width: 0;
}

.password-wrapper input::placeholder {
    color: #a0b4d6;
}

.show-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-mid);
    padding: 0;
    flex-shrink: 0;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.show-btn:hover { color: var(--blue-dark); }

/* Forgot Password */
.forgot-link {
    text-align: right;
    margin-top: -4px;
    margin-bottom: 8px;
}

.forgot-link a {
    font-size: 13px;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link a:hover { color: var(--blue-mid); }

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--green-gradient);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(34, 197, 94, 0.45);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* OR Divider */
.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-light);
    font-size: 13px;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Social Buttons */
.btn-social {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.btn-facebook {
    background: #1877f2;
    color: #fff;
    box-shadow: 0 4px 16px rgba(24, 119, 242, 0.3);
}

.btn-facebook:hover {
    background: #1565d8;
    transform: translateY(-2px);
}

.btn-google {
    background: #fff;
    color: var(--text-dark);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.btn-google:hover {
    background: #f8faff;
    transform: translateY(-2px);
}

/* Auth footer */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-mid);
}

.auth-footer a {
    color: var(--blue-mid);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* Error / Success Messages */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 14px;
    display: none;
    animation: slideDown 0.3s ease;
}

.alert.show { display: flex; align-items: center; gap: 8px; }

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green-dark);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   DASHBOARD
   =========================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px 4px;
    position: relative;
    z-index: 10;
}

.notif-btn {
    background: rgba(255,255,255,0.7);
    border: none;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
    transition: var(--transition);
}

.notif-btn:hover { background: rgba(255,255,255,0.9); }

.notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.dashboard-logo {
    height: 50px;
    object-fit: contain;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: var(--blue-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    transition: var(--transition);
}

.profile-avatar:hover { transform: scale(1.05); }

/* Balance Card */
.balance-card {
    margin: 12px 20px;
    background: var(--blue-gradient);
    border-radius: 20px;
    padding: 20px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.35);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.balance-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.balance-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin-bottom: 4px;
}

.balance-amount {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    font-family: 'Nunito', sans-serif;
}

.cashin-btn {
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.4);
    border-radius: 50px;
    padding: 10px 18px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(8px);
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.cashin-btn:hover {
    background: rgba(255,255,255,0.28);
    transform: scale(1.04);
}

/* Quick Actions Grid */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 20px;
    position: relative;
    z-index: 10;
}

.action-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255,255,255,0.8);
    transition: var(--transition);
    text-align: center;
    backdrop-filter: blur(10px);
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.18);
}

.action-card:active { transform: translateY(-2px); }

.action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon.blue {
    background: linear-gradient(135deg, #1a3a8f, #2563eb);
}

.action-icon.green {
    background: linear-gradient(135deg, #059669, #22c55e);
}

.action-icon svg {
    color: #fff;
}

.action-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

/* All Merchants — full-width banner below the quick actions grid */
.all-merchants-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 4px 20px 20px;
    padding: 16px 18px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255,255,255,0.8);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 10;
}

.all-merchants-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.16);
}

.all-merchants-banner:active { transform: translateY(-1px); }

.amb-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.amb-text { flex: 1; min-width: 0; }

.amb-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.amb-sub {
    font-size: 11.5px;
    color: #94a8d4;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dynamic banner slider — JS controls the transform (any number of slides),
   CSS just provides the smooth transition between positions. */
.promo-slider {
    margin: 0 20px 20px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    position: relative;
    background: #dbe4f5;
}

.promo-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.promo-slider-track img {
    width: 100%;
    flex-shrink: 0;
    display: block;
    aspect-ratio: 1000 / 500;
    object-fit: cover;
}

.promo-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.promo-slider-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
}

.promo-slider-dots .dot.active {
    background: #fff;
    width: 18px;
    border-radius: 4px;
    transition: width 0.3s;
}

/* Section Titles */
.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    padding: 0 20px;
    margin-bottom: 10px;
    position: relative;
    z-index: 10;
}

/* Promo Banner */
.promo-banner {
    margin: 4px 20px 16px;
    background: linear-gradient(135deg, #1e5fcc, #2563eb, #0ea5e9);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.promo-banner:hover { transform: scale(1.02); }

.promo-text h3 {
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.promo-text p {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

.promo-img {
    font-size: 36px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

/* Activity List */
.activity-list {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 10;
    padding-bottom: 90px;
}

.activity-item {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.8);
    transition: var(--transition);
    margin-bottom: 8px;
}

.activity-item:hover { transform: translateX(4px); }

.activity-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.activity-icon.send { background: rgba(239, 68, 68, 0.12); }
.activity-icon.receive { background: rgba(34, 197, 94, 0.12); }
.activity-icon.cashin { background: rgba(37, 99, 235, 0.12); }

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-desc {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-date {
    font-size: 11.5px;
    color: var(--text-light);
    margin-top: 2px;
}

.activity-amount {
    font-size: 14.5px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    white-space: nowrap;
}

.activity-amount.negative { color: var(--danger); }
.activity-amount.positive { color: var(--success); }

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(37, 99, 235, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 16px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(37, 99, 235, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 0 16px;
    transition: var(--transition);
    background: none;
    border: none;
    outline: none;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    color: #a0b4d6;
    transition: var(--transition);
}

.nav-item span {
    font-size: 10.5px;
    font-weight: 600;
    color: #a0b4d6;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.nav-item.active svg { color: var(--blue-mid); }
.nav-item.active span { color: var(--blue-mid); }

.nav-item:hover svg, .nav-item:hover span { color: var(--blue-mid); }

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Page transitions */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

/* TX History scrollable inner area */
#page-tx-history .tx-scroll-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 30px;
}

#page-tx-history .tx-scroll-area::-webkit-scrollbar { display: none; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll */
.dashboard-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.dashboard-scroll::-webkit-scrollbar { display: none; }

/* Responsive */
@media (min-width: 480px) {
    body {
        background: linear-gradient(135deg, #1a3a8f 0%, #0f2057 100%);
        min-height: 100vh;
        align-items: center;
    }

    .phone-wrapper {
        max-width: 390px;
        min-height: 820px;
        max-height: 900px;
        border-radius: 40px;
        box-shadow: 
            0 0 0 10px #1a1a2e,
            0 0 0 11px #0f2057,
            0 40px 80px rgba(0,0,0,0.5);
        margin: 30px auto;
        overflow: hidden;
    }

    .bottom-nav {
        border-radius: 0 0 40px 40px;
        position: sticky;
        transform: none;
        left: auto;
    }
}

/* Terms text */
.terms-text {
    font-size: 12.5px;
    color: var(--text-light);
    text-align: center;
    margin-top: 16px;
    line-height: 1.6;
}

.terms-text a {
    color: var(--blue-mid);
    font-weight: 600;
    text-decoration: none;
}

/* Greeting text in dashboard */
.greeting-bar {
    padding: 0 20px 8px;
    position: relative;
    z-index: 10;
}

.greeting-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.greeting-sub {
    font-size: 12px;
    color: var(--text-light);
}

/* ===========================
   PHASE 2 - SEND MONEY & QR
   =========================== */

/* Page Header with Back Button */
.page-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    position: relative;
    z-index: 10;
    gap: 12px;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,0.1);
    transition: var(--transition);
    flex-shrink: 0;
}

.back-btn:hover { background: #fff; transform: translateX(-2px); }

.page-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    flex: 1;
    text-align: center;
}

.page-header-spacer {
    width: 40px;
    flex-shrink: 0;
}

/* Send Money Steps */
.send-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 24px 20px;
    position: relative;
    z-index: 10;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.step-circle.active {
    background: var(--blue-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.step-circle.done {
    background: var(--green-gradient);
    color: #fff;
}

.step-circle.inactive {
    background: rgba(255,255,255,0.8);
    color: var(--text-light);
    border: 1.5px solid var(--border-color);
}

.step-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.step-label.active { color: var(--blue-mid); }
.step-label.done { color: var(--green-dark); }

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 6px;
    margin-bottom: 18px;
    transition: var(--transition);
}

.step-line.done { background: var(--green-primary); }

/* Send Form Content */
.send-content {
    flex: 1;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.input-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 8px;
    display: block;
}

/* Recipient Card (shown after lookup) */
.recipient-card {
    background: rgba(34, 197, 94, 0.08);
    border: 1.5px solid rgba(34, 197, 94, 0.3);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    animation: slideDown 0.3s ease;
}

.recipient-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--green-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.recipient-info { flex: 1; }
.recipient-name { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.recipient-mobile { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.recipient-check {
    color: var(--green-primary);
}

/* Amount Input */
.amount-display {
    text-align: center;
    padding: 20px 0 10px;
}

.amount-prefix {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
    vertical-align: top;
    margin-top: 8px;
    display: inline-block;
}

.amount-input-big {
    background: none;
    border: none;
    outline: none;
    font-size: 52px;
    font-weight: 800;
    color: var(--text-dark);
    font-family: 'Nunito', sans-serif;
    width: 200px;
    text-align: center;
    caret-color: var(--blue-mid);
}

.amount-input-big::placeholder { color: rgba(26,58,143,0.2); }

.amount-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue-mid), transparent);
    margin: 0 40px 6px;
    border-radius: 2px;
}

.balance-hint {
    text-align: center;
    font-size: 12.5px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.balance-hint span { font-weight: 700; color: var(--blue-mid); }

/* Note input */
.note-input {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    resize: none;
    transition: var(--transition);
}

.note-input:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.note-input::placeholder { color: #a0b4d6; }

/* Send confirmation card */
.confirm-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255,255,255,0.9);
    margin-bottom: 16px;
}

.confirm-amount-display {
    text-align: center;
    padding: 16px 0;
}

.confirm-amount-label {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.confirm-amount-value {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    font-family: 'Nunito', sans-serif;
    letter-spacing: -1px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13.5px;
}

.confirm-row:last-child { border-bottom: none; }
.confirm-row-label { color: var(--text-light); }
.confirm-row-value { font-weight: 600; color: var(--text-dark); }
.confirm-row-value.green { color: var(--green-dark); }
.confirm-row-value.blue { color: var(--blue-mid); }

/* Success Screen */
.success-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 24px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.success-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--green-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 12px 32px rgba(34,197,94,0.35);
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.success-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.5;
}

.success-detail-card {
    width: 100%;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    text-align: left;
}

.ref-number {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 16px;
}

.ref-number span {
    font-weight: 700;
    color: var(--blue-mid);
    font-family: monospace;
    font-size: 13px;
}

/* OR divider for send page */
.send-or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-light);
    font-size: 13px;
}

.send-or-divider::before,
.send-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* QR Scan button */
.btn-qr-scan {
    width: 100%;
    padding: 14px;
    background: rgba(37,99,235,0.08);
    border: 1.5px dashed rgba(37,99,235,0.3);
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--blue-mid);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-qr-scan:hover {
    background: rgba(37,99,235,0.14);
    border-style: solid;
}

/* QR Code page */
.qr-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 24px 32px;
    position: relative;
    z-index: 10;
}

.qr-card {
    background: #fff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 12px 40px rgba(37,99,235,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 280px;
    border: 1px solid rgba(37,99,235,0.1);
}

.qr-logo {
    height: 36px;
    object-fit: contain;
}

#qr-canvas {
    border-radius: 12px;
}

.qr-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
}

.qr-mobile {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

.qr-hint {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin-top: 8px;
    line-height: 1.5;
    padding: 0 16px;
}

.btn-outline {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1.5px solid var(--blue-mid);
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--blue-mid);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-outline:hover {
    background: rgba(37,99,235,0.06);
}

/* Scanner overlay */
.scanner-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px 24px;
    position: relative;
    z-index: 10;
}

.scanner-box {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

#scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-frame {
    width: 180px;
    height: 180px;
    border: 3px solid #fff;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 0 0 1000px rgba(0,0,0,0.4);
}

.scanner-line {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
    animation: scanLine 2s linear infinite;
    top: 0;
}

@keyframes scanLine {
    0% { top: 4px; }
    100% { top: calc(100% - 6px); }
}

.scanner-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    margin-top: 16px;
    line-height: 1.6;
}


/* ===========================
   PHASE 3 - CASH IN
   =========================== */

/* Method Selection Grid */
.method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.method-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 2px 8px rgba(37,99,235,0.06);
}

.method-card:hover {
    border-color: var(--blue-mid);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.15);
}

.method-card.selected {
    border-color: var(--blue-mid);
    background: rgba(37,99,235,0.06);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.method-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.method-icon.gcash   { background: linear-gradient(135deg, #0071c5, #00a3e0); }
.method-icon.maya    { background: linear-gradient(135deg, #00b14f, #00d46a); }
.method-icon.bank    { background: linear-gradient(135deg, #1a3a8f, #2563eb); }
.method-icon.otc     { background: linear-gradient(135deg, #f59e0b, #f97316); }

.method-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.method-fee-badge {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(37,99,235,0.08);
    padding: 2px 8px;
    border-radius: 20px;
}

.method-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--blue-mid);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.method-card.selected .method-check { display: flex; }
.method-card { position: relative; }

/* Fee Summary Box */
.fee-summary {
    background: rgba(37,99,235,0.06);
    border: 1.5px solid rgba(37,99,235,0.15);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
    color: var(--text-mid);
}

.fee-row.total {
    border-top: 1px solid rgba(37,99,235,0.15);
    margin-top: 6px;
    padding-top: 10px;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
}

.fee-row .fee-val { font-weight: 600; }
.fee-row.total .fee-val { color: var(--blue-mid); font-size: 15px; }

/* Instructions Card */
.instructions-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--card-shadow);
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.9);
}

.instructions-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.4;
}

.instruction-step:last-child { border-bottom: none; }

.step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--blue-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Reference Number Box */
.ref-box {
    background: linear-gradient(135deg, #1a3a8f, #2563eb);
    border-radius: 16px;
    padding: 18px;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.ref-box::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}

.ref-box-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
    font-weight: 500;
}

.ref-box-number {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
}

.ref-copy-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 6px 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.ref-copy-btn:hover { background: rgba(255,255,255,0.3); }

/* Account Details Box */
.account-box {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 14px 16px;
    border: 1.5px dashed rgba(37,99,235,0.25);
    margin-bottom: 14px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
}

.account-row-label { color: var(--text-light); }
.account-row-value { font-weight: 700; color: var(--text-dark); }

/* Expiry warning */
.expiry-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #92400e;
    margin-bottom: 16px;
}

/* Pending Requests List */
.pending-list {
    margin-top: 8px;
}

.pending-item {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 8px rgba(37,99,235,0.06);
    cursor: pointer;
    transition: var(--transition);
}

.pending-item:hover { transform: translateX(4px); }

.pending-status {
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

.pending-status.pending  { background: rgba(245,158,11,0.15); color: #92400e; }
.pending-status.completed { background: rgba(34,197,94,0.15); color: var(--green-dark); }
.pending-status.expired  { background: rgba(239,68,68,0.1); color: var(--danger); }

/* Simulate confirm section (for testing) */
.simulate-box {
    background: rgba(245,158,11,0.08);
    border: 1.5px dashed rgba(245,158,11,0.4);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.simulate-label {
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}


/* ===========================
   BRANDED PAYMENT METHOD BUTTONS
   =========================== */

.method-grid-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.method-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(37,99,235,0.06);
    position: relative;
    overflow: hidden;
}

.method-btn::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: transparent;
    transition: var(--transition);
    border-radius: 4px 0 0 4px;
}

.method-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,99,235,0.12);
    border-color: rgba(37,99,235,0.25);
}

.method-btn.selected {
    border-color: var(--blue-mid);
    background: rgba(37,99,235,0.04);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1), 0 8px 24px rgba(37,99,235,0.12);
}

.method-btn.selected::before { background: var(--blue-mid); }

/* GCash selected accent */
#method-gcash.selected { border-color: #0071C5; background: rgba(0,113,197,0.04); box-shadow: 0 0 0 3px rgba(0,113,197,0.1); }
#method-gcash.selected::before { background: #0071C5; }

/* Maya selected accent */
#method-maya.selected { border-color: #00B14F; background: rgba(0,177,79,0.04); box-shadow: 0 0 0 3px rgba(0,177,79,0.1); }
#method-maya.selected::before { background: #00B14F; }

/* OTC selected accent */
#method-otc.selected { border-color: #f59e0b; background: rgba(245,158,11,0.04); box-shadow: 0 0 0 3px rgba(245,158,11,0.1); }
#method-otc.selected::before { background: #f59e0b; }

.method-btn-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.gcash-logo svg text { letter-spacing: -0.5px; }
.maya-logo svg text { letter-spacing: -0.5px; }

.bank-label {
    font-size: 15px;
    font-weight: 800;
    color: #1a3a8f;
    letter-spacing: -0.3px;
}

.otc-label {
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    line-height: 1.2;
}

.method-btn-fee {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    background: rgba(37,99,235,0.07);
    padding: 4px 10px;
    border-radius: 20px;
}

#method-gcash .method-btn-fee  { background: rgba(0,113,197,0.08); color: #005fa3; }
#method-maya .method-btn-fee   { background: rgba(0,177,79,0.08); color: #007a34; }
#method-otc .method-btn-fee    { background: rgba(245,158,11,0.1); color: #92400e; }

.method-btn-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--blue-mid);
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

#method-gcash.selected .method-btn-check  { background: #0071C5; display: flex; }
#method-maya.selected .method-btn-check   { background: #00B14F; display: flex; }
#method-bank_transfer.selected .method-btn-check { background: #1a3a8f; display: flex; }
#method-otc.selected .method-btn-check    { background: #f59e0b; display: flex; }


/* ===========================
   IMPROVED QR SCANNER UI
   =========================== */

.scanner-box {
    position: relative;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

#scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-frame {
    width: 200px;
    height: 200px;
    position: relative;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
    border-radius: 12px;
}

/* Animated scan line */
.scanner-line {
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #22c55e 30%, #22c55e 70%, transparent 100%);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(34,197,94,0.8);
    animation: scanLine 2s ease-in-out infinite;
    top: 0;
}

@keyframes scanLine {
    0%   { top: 4px; opacity: 1; }
    90%  { opacity: 1; }
    100% { top: calc(100% - 7px); opacity: 0.6; }
}

/* Corner markers */
.corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: #22c55e;
    border-style: solid;
}

.corner.tl { top: -2px; left: -2px;  border-width: 4px 0 0 4px; border-radius: 6px 0 0 0; }
.corner.tr { top: -2px; right: -2px; border-width: 4px 4px 0 0; border-radius: 0 6px 0 0; }
.corner.bl { bottom: -2px; left: -2px;  border-width: 0 0 4px 4px; border-radius: 0 0 0 6px; }
.corner.br { bottom: -2px; right: -2px; border-width: 0 4px 4px 0; border-radius: 0 0 6px 0; }

/* Status indicator */
.scanner-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.85);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(37,99,235,0.1);
    backdrop-filter: blur(8px);
}

.scanner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
    transition: background 0.3s;
}

.scanner-dot.active {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.25);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.scanner-dot.error { background: #ef4444; }

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.25); }
    50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0.1); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 14px 40px rgba(239,68,68,0.4); }
    50%       { box-shadow: 0 14px 55px rgba(239,68,68,0.7); }
}

#scanner-status-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}


/* ===========================
   PHASE 4 - TRANSACTION HISTORY
   =========================== */

/* Filter Bar */
.filter-bar {
    padding: 0 20px 12px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border-color);
    background: rgba(255,255,255,0.85);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
}

.filter-chip:hover {
    border-color: var(--blue-mid);
    color: var(--blue-mid);
    background: rgba(37,99,235,0.05);
}

.filter-chip.active {
    background: var(--blue-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.filter-chip .chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}

/* Transaction items */
.tx-list {
    padding: 0 20px;
    padding-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 10;
}

.tx-date-group {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 8px 0 4px;
}

.tx-item {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.85);
    box-shadow: 0 2px 8px rgba(37,99,235,0.06);
    cursor: pointer;
    transition: var(--transition);
}

.tx-item:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.12);
}

.tx-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.tx-icon.send    { background: rgba(239,68,68,0.1); }
.tx-icon.receive { background: rgba(34,197,94,0.1); }
.tx-icon.cash_in { background: rgba(37,99,235,0.1); }
.tx-icon.cash_out{ background: rgba(245,158,11,0.1); }

.tx-info { flex: 1; min-width: 0; }

.tx-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-meta {
    font-size: 11.5px;
    color: var(--text-light);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tx-status-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.tx-status-badge.completed { background: rgba(34,197,94,0.12); color: var(--green-dark); }
.tx-status-badge.pending   { background: rgba(245,158,11,0.12); color: #92400e; }
.tx-status-badge.failed    { background: rgba(239,68,68,0.1); color: var(--danger); }

.tx-amount {
    font-size: 15px;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    white-space: nowrap;
    text-align: right;
}

.tx-amount.negative { color: var(--danger); }
.tx-amount.positive { color: var(--success); }

.tx-time {
    font-size: 10.5px;
    color: var(--text-light);
    margin-top: 2px;
    text-align: right;
}

/* Load More button */
.load-more-btn {
    width: 100%;
    padding: 13px;
    background: rgba(37,99,235,0.07);
    border: 1.5px solid rgba(37,99,235,0.2);
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--blue-mid);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 4px;
}

.load-more-btn:hover {
    background: rgba(37,99,235,0.12);
    border-color: var(--blue-mid);
}

/* Empty state */
.tx-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-light);
}

.tx-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.tx-empty-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-mid);
    margin-bottom: 6px;
}

.tx-empty-sub {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

/* Transaction Detail Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,32,87,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-sheet {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 20px 24px 40px;
    animation: slideUp 0.3s cubic-bezier(0.34,1.3,0.64,1);
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: 0 auto 20px;
}

.modal-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 20px;
}

.modal-amount {
    text-align: center;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.modal-amount.negative { background: rgba(239,68,68,0.07); }
.modal-amount.positive { background: rgba(34,197,94,0.07); }

.modal-amount-value {
    font-size: 36px;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
}

.modal-amount-value.negative { color: var(--danger); }
.modal-amount-value.positive { color: var(--success); }

.modal-amount-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.modal-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13.5px;
}

.modal-detail-row:last-child { border-bottom: none; }
.modal-detail-label { color: var(--text-light); font-weight: 500; }
.modal-detail-value { font-weight: 600; color: var(--text-dark); text-align: right; max-width: 60%; }
.modal-detail-value.ref { font-family: monospace; font-size: 12px; color: var(--blue-mid); }

.modal-close-btn {
    width: 100%;
    padding: 14px;
    background: var(--blue-gradient);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition);
}

.modal-close-btn:hover { opacity: 0.9; }

/* Summary Cards */
.tx-summary-row {
    display: flex;
    gap: 10px;
    padding: 0 20px 14px;
    position: relative;
    z-index: 10;
}

.tx-summary-card {
    flex: 1;
    background: var(--card-bg);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(37,99,235,0.07);
    border: 1px solid rgba(255,255,255,0.85);
    text-align: center;
}

.tx-summary-label {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 4px;
}

.tx-summary-value {
    font-size: 14px;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
}

.tx-summary-value.green { color: var(--success); }
.tx-summary-value.red   { color: var(--danger); }


