:root {
    --primary: #007dfe;
    --primary-dark: #1e40af;
    --success: #22c55e;
    --bg: #f8fafc;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    margin: 0;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* --- HEADER --- */
.app-header {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: white;
    padding: 25px 20px 60px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    position: sticky; top: 0; z-index: 100;
}

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.logo-box { 
    background: rgba(255, 255, 255, 0.15); 
    width: 50px; height: 50px; 
    border-radius: 12px; 
    display: flex; align-items: center; justify-content: center; 
    overflow: hidden; backdrop-filter: blur(5px); 
}
.header-logo { width: 100%; height: 100%; object-fit: contain; padding: 5px; }

.route-switcher { background: rgba(0,0,0,0.2); padding: 4px; border-radius: 12px; display: flex; position: relative; }
.switch-btn { flex: 1; background: none; border: none; color: rgba(255,255,255,0.6); padding: 12px; font-weight: 800; cursor: pointer; z-index: 2; font-size: 0.8rem; transition: 0.3s; }
.switch-btn.active { color: white; }
.nav-pill { position: absolute; width: calc(50% - 4px); height: calc(100% - 8px); background: rgba(255,255,255,0.15); border-radius: 8px; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1; }

/* --- TABLE --- */
.container { max-width: 500px; margin: -30px auto 30px; padding: 0 15px; }
.pro-table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.pro-table td { background: white; padding: 15px; border-radius: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }

.type-wrap { display: flex; align-items: center; gap: 12px; }
.pro-icon { width: 40px; height: 40px; border-radius: 10px; }
.main-label { font-weight: 800; font-size: 0.9rem; display: block; }
.sub-label { font-size: 0.65rem; color: #64748b; font-weight: 600; }

.pay-btn { background: #f1f5f9; border: none; padding: 12px; border-radius: 10px; font-weight: 800; width: 100%; cursor: pointer; transition: 0.2s; }
.active-col { background: #eff6ff !important; color: var(--primary) !important; border: 1px solid #dbeafe !important; }

/* --- MODAL SYSTEM --- */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 1000; opacity: 0; transition: opacity 0.3s; }
.overlay.is-visible { display: block; opacity: 1; }

.modal { 
    display: none; position: fixed; 
    bottom: -100%; left: 50%; 
    transform: translateX(-50%); 
    background: white; width: 100%; max-width: 500px; 
    padding: 30px; border-top-left-radius: 30px; border-top-right-radius: 30px; 
    z-index: 1001; text-align: center; 
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}
.modal.is-visible { bottom: 0; display: block; }

.modal-step { display: none; animation: fadeIn 0.3s ease-in-out; }
.modal-step.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- CONTENT UI --- */
.amount-box { background: #f0f7ff; padding: 20px; border-radius: 20px; margin-bottom: 25px; }
.a-value { font-size: 2.2rem; font-weight: 800; color: var(--primary); }

.qr-box { background: #f8fafc; padding: 15px; border-radius: 20px; display: inline-block; position: relative; margin-bottom: 20px; border: 2px solid #e2e8f0; cursor: pointer; }
.qr-box img { width: 150px; border-radius: 10px; display: block; }
.qr-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,125,254,0.8); color: white; font-size: 0.7rem; padding: 5px; border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; font-weight: 700; }

.btn-primary { background: var(--primary); color: white; border: none; padding: 16px; width: 100%; border-radius: 15px; font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0,125,254,0.3); }
.btn-cancel { background: none; border: none; color: #ef4444; font-weight: 700; margin-top: 15px; cursor: pointer; }

/* --- SUCCESS SCREEN --- */
.check-icon { width: 60px; height: 60px; background: var(--success); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 2rem; }
.ref-card { background: #f8fafc; padding: 20px; border-radius: 15px; border: 1px dashed #cbd5e1; }
.ref-tag { font-size: 0.65rem; color: #64748b; font-weight: 800; letter-spacing: 1px; }

.qr-result-container { margin-top: 15px; display: flex; justify-content: center; }
#ref-qr-img { width: 150px; border: 5px solid white; box-shadow: 0px 4px 10px rgba(0,0,0,0.1); border-radius: 8px; }


/* Registration Button */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.register-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.register-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.6);
}

.register-icon {
    font-size: 15px;
}