@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
    :root {
        --primary: #00A651; --primary-dark: #008C45; --primary-light: #E8F5E9;
        --bg-main: #F8F9FA; --bg-card: #FFFFFF;
        --text-primary: #1A1D29; --text-secondary: #6B7280; --text-muted: #9CA3AF;
        --border: #E5E7EB; --shadow: 0 4px 12px rgba(0, 0, 0, 0.04); --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
        --radius: 16px; --radius-lg: 24px;
    }
    * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
    body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg-main); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; }
    
    .screen { display: none; min-height: 100vh; animation: fadeIn 0.3s ease; padding-bottom: 90px; }
    .screen.active { display: flex; flex-direction: column; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    /* 登录/激活页 */
    .login-screen { align-items: center; justify-content: center; padding: 24px; background: linear-gradient(180deg, var(--primary) 0%, #00C853 40%, var(--bg-main) 100%); }
    .login-container { width: 100%; max-width: 400px; }
    .login-logo { text-align: center; margin-bottom: 32px; color: white; }
    .login-logo .logo-icon { width: 72px; height: 72px; background: rgba(255,255,255,0.2); border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; backdrop-filter: blur(8px); }
    .login-logo h1 { font-size: 28px; font-weight: 700; }
    .login-logo p { font-size: 14px; opacity: 0.9; margin-top: 4px; }
    .login-form { background: var(--bg-card); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-lg); }
    .form-group { margin-bottom: 16px; }
    .form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
    .form-group input, .form-group select { width: 100%; padding: 14px 16px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 12px; color: var(--text-primary); font-size: 15px; outline: none; transition: 0.2s; }
    .form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.15); }
    .btn-primary { width: 100%; padding: 15px; background: var(--primary); border: none; border-radius: 12px; color: white; font-size: 16px; font-weight: 600; cursor: pointer; transition: 0.2s; }
    .btn-primary:hover { background: var(--primary-dark); }
    .login-footer { text-align: center; margin-top: 20px; color: rgba(255,255,255,0.8); font-size: 12px; }

    /* 顶部绿头 */
    .app-header {
        background: var(--primary); padding: 24px 20px 40px; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        display: flex; align-items: center; justify-content: center; position: relative; z-index: 5;
    }
    .app-header.has-back { justify-content: flex-start; padding-left: 20px; }
    .app-header h2 { font-size: 20px; font-weight: 700; color: white; margin: 0; }
    .header-actions { position: absolute; right: 20px; display: flex; gap: 10px; align-items: center; }
    .header-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
    .header-btn:hover { opacity: 0.8; }
    .back-btn { position: absolute; left: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    
    .app-content { flex: 1; padding: 0 16px; position: relative; z-index: 10; }

    /* 搜索框 */
    .search-bar {
        background: var(--bg-card); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 10px;
        box-shadow: var(--shadow-lg); margin-top: -20px; position: relative; z-index: 15; margin-bottom: 20px;
    }
    .search-bar svg { color: var(--text-muted); flex-shrink: 0; }
    .search-bar input { border: none; background: transparent; width: 100%; font-size: 15px; outline: none; color: var(--text-primary); }

    /* 主页账户卡 */
    .account-card {
        background: var(--bg-card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); 
        margin-bottom: 24px; transition: all 0.3s ease;
    }
    .acc-header { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; margin-bottom: 4px; }
    .acc-number { font-family: monospace; font-size: 14px; color: var(--text-muted); margin-bottom: 12px; letter-spacing: 0.5px; }
    .acc-balance { display: flex; align-items: center; gap: 8px; }
    .acc-balance .currency { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
    .acc-balance .amount { font-size: 28px; font-weight: 800; color: var(--text-primary); }
    .acc-balance .eye-icon { width: 20px; height: 20px; color: var(--primary); cursor: pointer; margin-left: auto; }

    /* 网格基础 */
    .action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
    .grid-item {
        background: var(--bg-card); border-radius: 16px; padding: 16px 8px; display: flex; flex-direction: column;
        align-items: center; gap: 10px; box-shadow: var(--shadow); transition: 0.2s;
    }
    .grid-item[onclick] { cursor: pointer; }
    .grid-item[onclick]:active { transform: scale(0.96); }
    .grid-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
    .grid-label { font-size: 11px; font-weight: 500; color: #333; text-align: center; line-height: 1.3; margin-top: 2px; }

    /* ===== Send Money 页面样式 ===== */
    .send-option-card {
        background: var(--bg-card); border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 16px;
        box-shadow: var(--shadow); margin-bottom: 12px; cursor: pointer; transition: 0.2s;
    }
    .send-option-card:active { background: #F9FAFB; }
    .send-icon-box { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .send-text h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
    .send-text p { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
    
    .fav-section { margin-bottom: 20px; }
    .fav-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
    .fav-header h3 { font-size: 16px; font-weight: 700; }
    .fav-header span { font-size: 13px; color: var(--primary); font-weight: 500; cursor: pointer; }
    .fav-empty-card {
        background: var(--bg-card); border-radius: var(--radius); padding: 40px 20px; text-align: center;
        box-shadow: var(--shadow); position: relative; overflow: hidden;
    }
    .fav-avatar { width: 100px; height: 100px; background: linear-gradient(135deg, #4ADE80, #10B981); border-radius: 50%; margin: 0 auto 16px; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; }
    .fav-avatar svg { width: 60px; height: 60px; fill: rgba(255,255,255,0.8); }
    .fav-add-btn {
        position: absolute; bottom: 0; right: 0; width: 32px; height: 32px; background: #EF4444; color: white;
        border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
        box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3); cursor: pointer; z-index: 2; border: 3px solid white;
    }
    .fav-empty-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
    .fav-empty-card p { font-size: 13px; color: var(--text-muted); }

    /* ===== Payments 页面样式 ===== */
    .payment-pills { display: flex; gap: 12px; margin-bottom: 24px; }
    .pill-btn { flex: 1; padding: 10px 0; background: var(--primary); color: white; border: none; border-radius: 24px; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s; }
    .pill-btn.outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
    .section-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
    .section-title span { font-size: 13px; color: var(--primary); font-weight: 500; cursor: pointer; }
    
    .recent-payments { display: flex; gap: 12px; margin-bottom: 24px; }
    .payment-item {
        flex: 1; background: var(--bg-card); border-radius: var(--radius); padding: 16px; text-align: center;
        box-shadow: var(--shadow); cursor: pointer; transition: 0.2s;
    }
    .payment-item:active { transform: scale(0.98); }
    .payment-icon { width: 48px; height: 48px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
    .payment-item h5 { font-size: 13px; font-weight: 600; }
    
    .quick-payments-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
    .qp-item {
        background: var(--bg-card); border-radius: var(--radius); padding: 16px 8px; text-align: center;
        box-shadow: var(--shadow); cursor: pointer; transition: 0.2s;
    }
    .qp-item:active { transform: scale(0.96); }
    .qp-icon { width: 40px; height: 40px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
    .qp-item p { font-size: 11px; font-weight: 500; line-height: 1.3; }

    /* ===== 底部导航栏 ===== */
    .bottom-nav {
        position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-card); border-top: 1px solid var(--border);
        display: flex; justify-content: space-around; align-items: flex-end; padding: 8px 0 24px; z-index: 100;
    }
    .nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 12px; cursor: pointer; transition: 0.2s; }
    .nav-item span { font-size: 10px; font-weight: 500; transition: 0.2s; color: var(--text-secondary); }
    .nav-item.active span { color: var(--primary); }
    .nav-item svg { width: 24px; height: 24px; fill: #4A5568; transition: 0.2s; }
    .nav-item.active svg { fill: var(--primary); }
    
    .nav-item.center-qr { position: relative; top: -22px; }
    .nav-item.center-qr .qr-circle {
        width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: white;
        display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 166, 81, 0.4); transition: 0.2s;
    }
    .nav-item.center-qr svg { width: 28px; height: 28px; fill: white; }
    
    .edit-menu-fab {
        position: absolute; bottom: 70px; right: 16px; background: var(--bg-card); border: 1px solid var(--border);
        border-radius: 20px; padding: 8px 14px; display: flex; align-items: center; gap: 6px;
        box-shadow: var(--shadow-lg); cursor: pointer; z-index: 20; color: var(--primary); font-weight: 600; font-size: 14px;
        transition: 0.2s;
    }
    .edit-menu-fab:active { transform: scale(0.95); background: var(--primary-light); }

    /* 转账表单样式 */
    .nabil-form-card, .other-bank-form { background: var(--bg-card); border-radius: var(--radius-lg); padding: 24px 20px; box-shadow: var(--shadow-lg); margin-top: -20px; position: relative; z-index: 15; margin-bottom: 20px; }
    .from-acc-selector { background: var(--bg-main); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
    .acc-balance-display { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 22px; margin-bottom: 4px; }
    .primary-badge { background: var(--primary); color: white; font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 600; margin-right: 8px; }
    .input-with-icon { position: relative; }
    .input-with-icon .icon-btn-right { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 10px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .icon-btn-info { background: var(--primary-light); color: var(--primary); }
    .icon-btn-contact { background: transparent; color: var(--primary); }
    .input-with-icon input { padding-right: 50px; }
    .form-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
    .btn-continue { background: var(--primary); color: white; height: 52px; font-size: 16px; font-weight: 600; border: none; border-radius: 12px; cursor: pointer; }
    .btn-cancel { background: transparent; color: var(--text-secondary); height: 52px; font-size: 16px; font-weight: 600; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
    .transfer-tabs-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 6px; display: flex; box-shadow: var(--shadow-lg); margin-top: -20px; position: relative; z-index: 15; margin-bottom: 20px; }
    .tab-btn-ob, .tab-btn { flex: 1; padding: 12px 4px; font-size: 12px; font-weight: 600; line-height: 1.3; text-align: center; color: var(--text-secondary); background: transparent; border: none; border-radius: 12px; cursor: pointer; }
    .tab-btn-ob.active, .tab-btn.active { background: var(--primary); color: white; }
    .fonepay-row { text-align: center; margin-bottom: 24px; font-size: 14px; color: var(--text-primary); }
    .fonepay-logo { display: inline-block; background: #ED1C24; color: white; padding: 2px 6px; border-radius: 4px; font-weight: 800; font-style: italic; margin: 0 4px; font-size: 12px; }
    .form-label { display: block; font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 8px; }
    .form-input-ob { width: 100%; padding: 14px 16px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 12px; font-size: 15px; outline: none; transition: 0.2s; }
    .select-wrapper { position: relative; }
    .select-wrapper select { width: 100%; padding: 14px 16px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 12px; font-size: 15px; outline: none; appearance: none; color: var(--text-secondary); }
    .select-wrapper::after { content: '▼'; font-size: 12px; color: var(--primary); position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
    .transfer-form { display: none; }
    .transfer-form.active { display: block; }

    .acc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; margin-bottom: 20px; }
    .acc-item { background: var(--bg-card); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); cursor: pointer; border: 2px solid transparent; }
    .acc-item.selected { border-color: var(--primary); background: var(--primary-light); }
    .acc-item-info h4 { font-size: 14px; font-weight: 600; }
    .acc-item-info p { font-size: 12px; color: var(--text-muted); font-family: monospace; }
    .acc-item-bal { font-size: 14px; font-weight: 700; color: var(--text-primary); text-align: right; }
    .acc-actions { display: flex; gap: 8px; }
    .icon-btn { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-main); border: none; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; }
    .add-acc-form { background: var(--bg-card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-top: 16px; }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }

    .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 200; display: none; align-items: flex-end; justify-content: center; }
    .modal-overlay.active { display: flex; }
    .modal { background: var(--bg-card); border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; animation: slideUp 0.3s ease; }
    @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
    .modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
    .modal-close { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-main); border: none; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; }
    .modal-body { padding: 24px; }
    .pin-container { display: flex; gap: 12px; justify-content: center; margin: 24px 0; }
    .pin-dot { width: 48px; height: 48px; border-radius: 12px; background: var(--bg-main); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
    .pin-dot.filled { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
    .pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 280px; margin: 0 auto; }
    .pin-key { padding: 14px; border-radius: 12px; background: var(--bg-main); border: 1px solid var(--border); font-size: 18px; font-weight: 600; cursor: pointer; text-align: center; }
    .pin-key:active { background: var(--primary-light); }
    .pin-key.empty { background: transparent; border: none; }
    .success-modal { text-align: center; padding: 32px 24px; }
    .success-icon { width: 72px; height: 72px; border-radius: 50%; background: #E8F5E9; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 20px; }
    .receipt-amount { font-size: 28px; font-weight: 700; color: var(--primary); text-align: center; margin: 8px 0 16px; }
    .receipt-card { background: var(--bg-main); border-radius: 12px; padding: 16px; margin: 16px 0; text-align: left; }
    .receipt-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
    .receipt-row:last-child { border: none; }
    .receipt-label { color: var(--text-secondary); }
    .receipt-value { font-weight: 600; color: var(--text-primary); text-align: right; }
    .spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; vertical-align: middle; margin-right: 6px; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .btn-loading { pointer-events: none; opacity: 0.8; }
    select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
    select option { background: var(--bg-card); color: var(--text-primary); }
    @media (min-width: 768px) { .app-content { max-width: 480px; margin: 0 auto; } .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); } .modal { border-radius: var(--radius-lg); margin-bottom: 20px; } .modal-overlay { align-items: center; } }
