/* --- VARIABLES & RESET --- */
        :root { --neon-pink: #ff007f; --bg-light: #fff0f6; --text-dark: #333; --text-gray: #777; --success: #00c853; --error: #f44336; }
        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }
        
        html { height: 100%; width: 100%; background-color: #e4e7eb; } 
        body { 
            height: 100%; width: 100%; max-width: 520px; margin: 0 auto; 
            position: relative; box-shadow: 0 0 25px rgba(0,0,0,0.15); 
            overflow: hidden; background-color: var(--bg-light); 
            display: flex; flex-direction: column; 
            user-select: none; -webkit-user-select: none; 
            padding-bottom: env(safe-area-inset-bottom);
        }
        
        .hidden { display: none !important; }

        /* --- LOADER --- */
        #loader { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-light); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.3s ease; }
        .loader-ring-box { position: relative; width: 100px; height: 100px; }
        svg.progress-ring { transform: rotate(-90deg); width: 100px; height: 100px; position: absolute; top:0; left:0;}
        .progress-ring__circle { stroke: var(--neon-pink); stroke-width: 4; fill: transparent; r: 42; cx: 50; cy: 50; stroke-dasharray: 264; stroke-dashoffset: 264; stroke-linecap: round; transition: stroke-dashoffset 0.1s linear; }
        .bg-ring { stroke: #ffe6f0; stroke-width: 4; fill: transparent; r: 42; cx: 50; cy: 50; }
        
        .loader-inner-logo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; font-size: 38px; color: var(--neon-pink); animation: pulseLogo 2s infinite; }
        @keyframes pulseLogo { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }
        
        #loading-text { margin-top: 15px; color: var(--neon-pink); font-weight: 600; font-size: 14px; letter-spacing: 1px; }

        /* --- PIN LOCK SCREEN --- */
        #pin-lock-scr { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-light); z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center; }
        .pin-dot-box { display: flex; gap: 20px; margin-bottom: 40px; }
        .pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--neon-pink); transition: 0.2s; }
        .pin-dot.filled { background: var(--neon-pink); transform: scale(1.1); }
        .pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 40px; width: 100%; max-width: 350px; }
        .pin-btn { width: 70px; height: 70px; border-radius: 50%; background: white; border: none; font-size: 26px; font-weight: 600; color: #333; box-shadow: 0 4px 10px rgba(0,0,0,0.06); display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.15s; margin: 0 auto; }
        .pin-btn:active { transform: scale(0.9); background: #f8f8f8; }

        /* --- LOGIN --- */
        #login-pg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 500; background: var(--bg-light); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 30px; overflow-y: auto; }
        .login-logo-box { width: 90px; height: 90px; background: white; border-radius: 22px; display: flex; align-items: center; justify-content: center; margin-bottom: 25px; box-shadow: 0 8px 20px rgba(255,0,127,0.15); }
        .login-logo-box i { font-size: 45px; color: var(--neon-pink); }
        #login-pg h2 { color: var(--text-dark); font-size: 2rem; font-weight: 700; margin-bottom: 5px; letter-spacing: -0.5px; }
        .login-tagline { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 35px; font-weight: 400; }
        .google-btn { background: var(--neon-pink); color: white; border: none; padding: 14px 30px; border-radius: 50px; font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 12px; box-shadow: 0 5px 15px rgba(255, 0, 127, 0.3); transition: transform 0.2s; width: 100%; max-width: 290px; justify-content: center; cursor: pointer; }
        .google-btn:active { transform: scale(0.98); }
        .login-alt-toggle { margin-top: 20px; font-size: 0.82rem; color: var(--neon-pink); cursor: pointer; font-weight: 600; text-decoration: underline; }
        #custom-auth-box { width: 100%; max-width: 290px; margin-top: 15px; display: flex; flex-direction: column; gap: 10px; }

        /* --- DASHBOARD STRUCTURE --- */
        #dash { display: flex; flex-direction: column; height: 100%; width: 100%; overflow: hidden; }

        /* --- HEADERS --- */
        header { background: var(--neon-pink); color: white; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 15px rgba(255, 0, 127, 0.25); z-index: 50; height: 60px; flex-shrink: 0; padding-top: max(10px, env(safe-area-inset-top)); }
        .header-left { display: flex; align-items: center; gap: 8px; cursor: pointer; max-width: 78%; overflow: hidden; }
        .back-btn-area { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; margin-right: 4px; flex-shrink: 0; }
        .back-btn-area:active { background: rgba(255,255,255,0.2); }
        .app-logo-head { font-size: 24px; text-shadow: 0 2px 4px rgba(0,0,0,0.2); flex-shrink: 0; display: inline-flex; align-items: center; }
        .header-title-box { display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
        .header-title-text { font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; display: flex; align-items: center; gap: 6px; }
        .acc-type-pill { font-size: 0.75rem; background: rgba(255,255,255,0.25); width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .profile-img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.8); object-fit: cover; flex-shrink: 0; cursor: pointer; background: white; }
        .header-avatar { width: 35px; height: 35px; border-radius: 50%; background: white; color: var(--neon-pink); font-weight: 700; display: flex; align-items: center; justify-content: center; margin-left: 0px; border: 2px solid rgba(255,255,255,0.5); font-size: 1.1rem; flex-shrink: 0;}

        /* --- SEARCH & LIST --- */
        #search-box-container { padding: 12px 15px 5px 15px; background: var(--bg-light); flex-shrink: 0; display: flex; gap: 8px; align-items: center; }
        .search-capsule { background: white; border-radius: 50px; padding: 0 15px; display: flex; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.03); border: 1px solid #f0f0f0; height: 45px; flex: 1; }
        .search-capsule i { display: inline-flex; align-items: center; justify-content: center; }
        .search-capsule input { border: none; outline: none; width: 100%; font-size: 0.95rem; color: #444; background: transparent; height: 100%; margin: 0 5px; }
        .dash-bal-pill { background: white; padding: 0 12px; height: 45px; border-radius: 50px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,0.03); border: 1px solid #f0f0f0; white-space: nowrap; flex-shrink: 0; min-width: 100px; }

        /* --- TRIP SUMMARY & CONTROLS BAR --- */
        #trip-top-bar { padding: 6px 15px 4px 15px; background: var(--bg-light); flex-shrink: 0; }
        .trip-info-card { background: white; border-radius: 14px; padding: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); border: 1px solid #ffe6f0; }
        .trip-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; margin-bottom: 10px; }
        .trip-stat-box { background: #fff9fc; padding: 6px 4px; border-radius: 8px; }
        .trip-stat-lbl { font-size: 0.65rem; color: #888; font-weight: 600; text-transform: uppercase; display: block; }
        .trip-stat-val { font-size: 0.9rem; font-weight: 700; color: var(--text-dark); }
        .trip-actions-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; border-top: 1px dashed #eee; padding-top: 8px; }
        .trip-btn-sm { border: none; background: var(--neon-pink); color: white; padding: 6px 14px; border-radius: 8px; font-size: 0.78rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
        .trip-btn-outline { border: 1.5px solid var(--neon-pink); background: #fff0f6; color: var(--neon-pink); padding: 6px 12px; border-radius: 8px; font-size: 0.78rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; position: relative; }
        .req-badge-dot { background: var(--error); color: white; border-radius: 50%; padding: 1px 5px; font-size: 0.65rem; font-weight: 700; margin-left: 2px; }

        /* SCROLLABLE LIST CONTAINER & STRICT ELLIPSIS MANAGEMENT */
        #party-container { flex: 1; overflow-y: auto; padding: 10px 15px; padding-bottom: 90px; -webkit-overflow-scrolling: touch; position: relative; }
        .party-card { background: white; margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 3px rgba(0,0,0,0.05); min-height: 70px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: rgba(0,0,0,0.05); gap: 8px; }
        .p-avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff0f6; color: var(--neon-pink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; border: 1px solid #ffcce6; flex-shrink: 0; }
        .p-info { flex: 1; margin-left: 4px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; min-width: 0; }
        .p-info h4 { font-size: 0.9rem; font-weight: 600; color: var(--text-dark); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; width: 100%; }
        .p-info h4 > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
        .p-info p { font-size: 0.75rem; color: var(--text-gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block; }
        .p-amount-box { text-align: right; display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
        .p-amount-box.bill-col-stack { flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; }
        .p-amt-val { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
        .p-amt-val-sm { font-weight: 600; font-size: 0.8rem; line-height: 1.1; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
        .col-green { color: var(--success); } .col-red { color: var(--error); } .col-gray { color: #999; }

        .freq-tag { font-size: 0.65rem; background: #e3f2fd; color: #1565c0; padding: 2px 6px; border-radius: 6px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex-shrink: 0; }
        .icon-only-tag { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; background: #fff3e0; color: #ef6c00; margin-left: 4px; flex-shrink: 0; }
        .btn-pay-now { background: var(--success); color: white; border: none; padding: 4px 10px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; cursor: pointer; box-shadow: 0 2px 5px rgba(0,200,83,0.25); display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; flex-shrink: 0; }

        /* --- PARTY VIEW --- */
        #party-view-pg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-light); z-index: 200; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
        #pv-summary-box { padding: 10px 15px 5px 15px; display: flex; justify-content: space-between; gap: 8px; background: var(--bg-light); flex-shrink: 0; }
        .pv-cap { flex: 1; background: white; padding: 8px 5px; border-radius: 10px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); display: flex; flex-direction: column; align-items: center; justify-content: center; }
        .pv-cap-lbl { font-size: 0.65rem; color: #999; font-weight: 600; text-transform: uppercase; margin-bottom: 2px; }
        .pv-cap-val { font-size: 0.9rem; font-weight: 700; }
        #tx-list-box { flex: 1; overflow-y: auto; padding: 15px; padding-bottom: 100px; -webkit-overflow-scrolling: touch; position: relative; }
        .tx-card { background: white; padding: 12px; border-radius: 10px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,0.05); cursor: pointer; transition: background 0.2s; user-select: none; gap: 8px; }
        .tx-card:active { background: #f9f9f9; }
        .tx-left { flex: 1; overflow: hidden; min-width: 0; padding-right: 6px; }
        .tx-left h6 { font-size: 0.8rem; color: #333; margin-bottom: 2px; margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; width: 100%; }
        .tx-left h6 > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
        .tx-left small { font-size: 0.7rem; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
        .tx-right { font-weight: 600; font-size: 0.95rem; flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
        .tx-right.bill-tx-stack { flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; }
        .pv-footer { position: absolute; bottom: calc(env(safe-area-inset-bottom)); left: 0; width: 100%; background: white; padding: 15px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); display: flex; gap: 15px; justify-content: center; z-index: 201; }
        .btn-action { flex: 1; border: none; padding: 12px; border-radius: 8px; color: white; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
        .btn-give { background: var(--error); } .btn-got { background: var(--success); }

        /* --- POPUPS & FORMS --- */
        .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; z-index: 100005; backdrop-filter: blur(2px); }
        .bottom-popup {
            position: absolute; bottom: 0; left: 0; width: 100%;
            background: white; border-radius: 22px 22px 0 0;
            padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom));
            transform: translateY(100%);
            transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
            z-index: 100006;
            height: auto; max-height: 80vh;
            overflow-y: auto; display: flex; flex-direction: column;
        }
        .bottom-popup.active { transform: translateY(0); }
        .center-pop-content { text-align: center; align-items: center; justify-content: space-between; }
        .pop-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; width: 100%; flex-shrink: 0; }
        .pop-title { font-size: 1.15rem; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .btn-close-pop { font-size: 22px; color: var(--neon-pink); cursor: pointer; padding: 2px 5px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

        /* --- OFFLINE DISCONNECT MODAL --- */
        #offline-disconnect-modal {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            z-index: 250000; display: flex; align-items: center; justify-content: center;
            padding: 20px;
        }
        #offline-disconnect-modal.hidden {
            display: none !important;
        }

        /* --- UNIFIED CENTER-MIDDLE MODAL --- */
        #center-smart-modal {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.55); backdrop-filter: blur(3px);
            z-index: 200000; display: flex; align-items: center; justify-content: center;
            padding: 22px;
        }
        .center-modal-card {
            background: white; width: 100%; max-width: 345px;
            border-radius: 22px; padding: 26px 22px;
            box-shadow: 0 18px 40px rgba(0,0,0,0.28);
            text-align: center; display: flex; flex-direction: column; align-items: center;
            animation: popScaleIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
        }
        @keyframes popScaleIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
        .cm-ring-wrap { position: relative; width: 86px; height: 86px; margin-bottom: 14px; }
        .cm-ring-svg { transform: rotate(-90deg); width: 86px; height: 86px; }
        .cm-ring-bg { stroke: #ffe6f0; stroke-width: 6; fill: transparent; r: 36; cx: 43; cy: 43; }
        .cm-ring-bar { stroke: var(--neon-pink); stroke-width: 6; fill: transparent; r: 36; cx: 43; cy: 43; stroke-dasharray: 226.2; stroke-dashoffset: 226.2; stroke-linecap: round; transition: stroke-dashoffset 0.15s linear; }
        .cm-ring-pct { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; font-weight: 700; color: var(--neon-pink); }
        .cm-icon-circle { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; margin-bottom: 14px; flex-shrink: 0; }
        .cm-details-box { width: 100%; background: #fff9fc; border: 1px solid #ffd6e8; border-radius: 12px; padding: 12px 14px; margin: 12px 0 18px 0; text-align: left; font-size: 0.82rem; color: #444; line-height: 1.7; }
        .cm-details-row { display: flex; justify-content: space-between; border-bottom: 1px dashed #f0d8e4; padding: 3px 0; gap: 10px; }
        .cm-details-row strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
        .cm-details-row:last-child { border-bottom: none; }
        
        .f-group { margin-bottom: 11px; width: 100%; position: relative; }
        .f-group label { display: block; font-size: 0.7rem; font-weight: 600; color: #999; margin-bottom: 4px; margin-left: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .inp-box-wrap { position: relative; width: 100%; display: flex; align-items: center; }
        .inp-icon { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); font-size: 16px; color: var(--neon-pink); z-index: 5; pointer-events: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; line-height: 1; }
        .f-group input, .f-group select { width: 100%; height: 44px; padding: 0 12px 0 38px; border: 1.5px solid #eaeaea; border-radius: 10px; outline: none; background: #fafafa; font-size: 0.9rem; transition: border 0.2s; color: #333; line-height: 44px; }
        .f-group input:focus, .f-group select:focus { border-color: var(--neon-pink); background: white; }
        .f-group input:disabled { background: #f2f2f2; color: #999; cursor: not-allowed; }
        .f-row-2col { display: flex; gap: 10px; width: 100%; align-items: flex-end; }
        .f-row-2col .f-group { flex: 1; min-width: 0; }
        .inc-toggle-wrap { display: flex; gap: 6px; height: 44px; width: 100%; }
        .inc-tile-btn { flex: 1; border: 1.5px solid #eaeaea; border-radius: 10px; background: #fafafa; font-size: 0.82rem; font-weight: 600; color: #666; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
        .inc-tile-btn.active { border-color: var(--neon-pink); background: #fff0f6; color: var(--neon-pink); }

        .input-error { border-color: red !important; background: #fff0f0 !important; }
        .shake-anim { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; border-color: var(--error) !important; }
        @keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }

        .btn-full { width: 100%; background: var(--neon-pink); color: white; border: none; padding: 13px; border-radius: 12px; font-weight: 600; cursor: pointer; font-size: 0.95rem; box-shadow: 0 4px 10px rgba(255, 0, 127, 0.2); display: flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; }
        .fab { position: absolute; bottom: calc(25px + env(safe-area-inset-bottom)); right: 20px; background: var(--neon-pink); color: white; border: none; padding: 12px 20px; border-radius: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; box-shadow: 0 6px 15px rgba(255, 0, 127, 0.35); z-index: 90; cursor: pointer; }

        /* --- ACTION BUTTONS --- */
        .action-row { display: flex; justify-content: center; gap: 15px; margin-bottom: 14px; width: 100%; flex-shrink: 0; }
        .act-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; color: #555; }
        .act-icon-box { width: 45px; height: 45px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: transform 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        .act-btn:active .act-icon-box { transform: scale(0.9); }
        .act-label { font-size: 0.7rem; font-weight: 600; }
        .bg-msg { background: #e3f2fd; color: #1e88e5; }
        .bg-wa { background: #e8f5e9; color: #2e7d32; }
        .bg-pdf { background: #ffebee; color: #c62828; }
        .bg-slip { background: #fff3e0; color: #ef6c00; }

        /* Confirm Box */
        .confirm-btns { display: flex; gap: 12px; justify-content: center; width: 100%; margin-top: 6px; }
        .btn-outline { flex: 1; border: 1.5px solid #ddd; background: white; color: #555; padding: 12px 18px; border-radius: 50px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 0.92rem; }
        .btn-danger { flex: 1; background: var(--error); color: white; border: none; padding: 12px 18px; border-radius: 50px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 10px rgba(244, 67, 54, 0.3); display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 0.92rem; }

        /* Account Input & Type Selector */
        #acc-main-view { display: flex; flex-direction: column; flex: 1; width: 100%; overflow: hidden; }
        #acc-list-box { flex: 1; overflow-y: auto; margin-bottom: 12px; border: 1px solid #f5f5f5; border-radius: 12px; padding: 4px; }
        .acc-row-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
        .acc-sel-check { color: var(--neon-pink); margin-right: 15px; font-size: 1.2rem; flex-shrink: 0; display: inline-flex; align-items: center; }
        .acc-name-label { flex: 1; font-weight: 500; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; min-width: 0; }
        .acc-name-label > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .acc-badge-list { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; }
        .badge-normal { background: #f0f0f0; color: #555; }
        .badge-trip { background: #e8f5e9; color: #2e7d32; }
        .badge-bill { background: #fff3e0; color: #ef6c00; }

        .acc-input-wrapper { display: flex; align-items: center; background: #fafafa; border: 1.5px solid #eaeaea; border-radius: 10px; padding: 0 10px; flex: 1; transition: border 0.2s; height: 45px; }
        .acc-input-wrapper:focus-within { border-color: var(--neon-pink); background: white; }
        .acc-input-wrapper input { border: none; background: transparent; padding: 0 5px; flex: 1; outline: none; font-size: 0.95rem; width: 100%; height: 100%; }
        .acc-clear-btn { color: #bbb; cursor: pointer; padding: 5px; font-size: 18px; display: none; }
        .acc-action-btn { font-size: 24px; margin-left: 8px; cursor: pointer; transition: 0.2s; flex-shrink: 0; display: inline-flex; align-items: center; }

        .type-selector-row { display: flex; gap: 8px; margin-bottom: 12px; width: 100%; flex-shrink: 0; }
        .type-opt-btn { flex: 1; padding: 9px; border: 1.5px solid #eaeaea; border-radius: 8px; background: #fafafa; font-size: 0.82rem; font-weight: 600; color: #666; cursor: pointer; text-align: center; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 5px; }
        .type-opt-btn.active { border-color: var(--neon-pink); background: #fff0f6; color: var(--neon-pink); }

        /* Success Layer */
        #success-layer { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3005; display: none; text-align: center; animation: popIn 0.3s ease-out; pointer-events: none; }
        @keyframes popIn { from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
        #success-layer i { font-size: 60px; color: var(--neon-pink); background: white; border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,0.2); width: 100px; height: 100px; display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 0;}
        
        /* Empty State */
        .empty-state-box { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; width: 100%; color: #bbb; text-align: center; position: absolute; top:0; left: 0; padding: 25px; }
        .empty-state-box i { font-size: 50px; margin-bottom: 12px; color: #e0e0e0; }
        .empty-state-box p { font-size: 0.92rem; font-weight: 500; line-height: 1.5; max-width: 300px; }

        #global-sync-status { margin: 6px auto 10px auto; padding: 7px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
        .gs-ok { background: #e8f5e9; color: var(--success); } .gs-pending { background: #fff3e0; color: #e65100; } .gs-offline { background: #ffebee; color: #d32f2f; }

        /* Hidden Slip Card for Capture */
        #slip-card-render { position: absolute; top: -9999px; left: -9999px; width: 350px; background: white; padding: 25px; border-radius: 15px; border: 1px solid #eee; text-align: center; font-family: 'Poppins', sans-serif; }
        .slip-logo { color: var(--neon-pink); font-size: 35px; margin-bottom: 10px; }
        .slip-title { font-size: 1.2rem; font-weight: 700; color: #333; margin-bottom: 5px; }
        .slip-amount { font-size: 2rem; font-weight: 700; margin: 15px 0; }
        .slip-details { color: #666; font-size: 0.9rem; line-height: 1.6; border-top: 1px dashed #ddd; border-bottom: 1px dashed #ddd; padding: 15px 0; margin: 10px 0; }
        .slip-footer { font-size: 0.75rem; color: #999; margin-top: 10px; }
        
        /* --- TOAST ALERT --- */
        #toast-alert { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 12px 25px; border-radius: 30px; font-size: 0.95rem; font-weight: 500; z-index: 100000; box-shadow: 0 8px 20px rgba(0,0,0,0.2); transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); white-space: nowrap; pointer-events: none; display: flex; align-items: center; gap: 8px; }
        #toast-alert.show { bottom: max(35px, calc(35px + env(safe-area-inset-bottom))); }

        /* Members List */
        #trip-mem-list { flex: 1; overflow-y: auto; margin-bottom: 12px; border: 1px solid #f5f5f5; border-radius: 12px; padding: 4px; }
        .trip-mem-item { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid #f0f0f0; cursor: pointer; border-radius: 8px; transition: background 0.15s; gap: 10px; }
        .trip-mem-item:active { background: #fff0f6; }
        .trip-mem-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; overflow: hidden; }
        .trip-mem-av { width: 34px; height: 34px; border-radius: 50%; background: #fff0f6; color: var(--neon-pink); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
        .trip-mem-info { flex: 1; min-width: 0; overflow: hidden; }
        .trip-mem-name-row { display: flex; align-items: center; gap: 4px; width: 100%; overflow: hidden; white-space: nowrap; }
        .trip-mem-name-txt { font-size: 0.88rem; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .trip-mem-sub-txt { font-size: 0.72rem; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

        /* Pending Request Card */
        .pending-req-card { background: #fff9fc; border: 1.5px solid #ffd6e8; border-radius: 14px; padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 2px 8px rgba(255,0,127,0.06); }
        .pending-req-top { display: flex; align-items: center; gap: 12px; width: 100%; overflow: hidden; }
        .pending-req-details { flex: 1; min-width: 0; overflow: hidden; text-align: left; }
        .pending-req-details h4 { font-size: 0.95rem; font-weight: 600; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
        .pending-req-details p { font-size: 0.76rem; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .pending-req-btns { display: flex; gap: 10px; width: 100%; }
        .pending-req-btns button { flex: 1; padding: 10px; border-radius: 10px; border: none; font-weight: 600; font-size: 0.85rem; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 3px 8px rgba(0,0,0,0.12); }

        /* Smart Backup Row */
        .smart-backup-row { display: flex; gap: 8px; width: 100%; max-width: 320px; margin: 4px auto; }
        .btn-backup-smart { flex: 1; background: #fff0f6; color: var(--neon-pink); border: 1.5px solid #ffcce6; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 0.82rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: 0.2s; }
        .btn-backup-smart:active { transform: scale(0.96); }

        /* Offline Mode Banner & Controls */
        .offline-banner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            background: #fff3e0;
            color: #e65100;
            padding: 8px 14px;
            margin: 6px 12px 6px 12px;
            border-radius: 12px;
            font-size: 0.82rem;
            font-weight: 600;
            border: 1.5px solid #ffe0b2;
            box-shadow: 0 2px 8px rgba(230, 81, 0, 0.08);
            transition: all 0.3s ease;
        }
        .offline-banner.syncing {
            background: #e3f2fd;
            color: #0288d1;
            border-color: #b3e5fc;
        }
        .offline-banner.synced {
            background: #e8f5e9;
            color: #2e7d32;
            border-color: #c8e6c9;
        }
        .offline-sync-btn {
            background: rgba(0, 0, 0, 0.07);
            border: none;
            padding: 4px 10px;
            border-radius: 8px;
            color: inherit;
            font-weight: 600;
            font-size: 0.78rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: background 0.2s;
        }
        .offline-sync-btn:hover { background: rgba(0, 0, 0, 0.14); }
        .offline-sync-btn:active { transform: scale(0.95); }
