/* ========================================
   SplitEase – OALET Design Style
   ======================================== */

:root {
    /* Palette from Image */
    --o-bg: #E6EDF6; /* Soft periwinkle/blue-grey */
    --o-white: #FFFFFF;
    --o-dark: #121212; /* Deep black for card */
    --o-label: #1A1C1E;
    --o-label-sec: #7C7C7C;
    --o-label-muted: #A3A3A3;
    
    /* Action Button Colors */
    --c-ice: #E8E5FF;
    --c-ice-fg: #6C5CE7;
    --c-mint: #C4F8D6;
    --c-mint-fg: #00B894;
    --c-lavender: #E4CBFF;
    --c-lavender-fg: #9B59B6;
    --c-peach: #FFDCAF;
    --c-peach-fg: #E67E22;

    --radius-huge: 32px;
    --radius-large: 24px;
    --radius-med: 18px;
    --radius-small: 12px;

    --font: 'Plus Jakarta Sans', sans-serif;
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);
}

/* --- Base & Background --- */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background-color: var(--o-bg);
    color: var(--o-label);
    line-height: 1.2;
    overflow-x: hidden;
    min-height: 100vh;
}

.oalet-bg {
    position: fixed;
    inset: 0; z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.4;
}
.b1 { width: 300px; height: 300px; background: var(--c-ice); top: -100px; left: -100px; }
.b2 { width: 250px; height: 250px; background: var(--c-mint); bottom: -100px; right: -50px; }
.b3 { width: 150px; height: 150px; background: var(--c-lavender); top: 30%; left: 80%; }

/* --- App Wrap --- */
.app-wrap {
    padding-top: env(safe-area-inset-top, 24px);
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

/* --- App Header --- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-main {
    width: 44px; height: 44px;
    background: #ccc url('https://i.pravatar.cc/150?u=rizmy') no-repeat center center / cover;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.welcome-text p { font-size: 0.82rem; color: var(--o-label-sec); }
.welcome-text h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.3px; }

.btn-bell {
    width: 42px; height: 42px;
    background: white; border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--o-label); box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* --- Hero Card --- */
.hero-card {
    background: var(--o-dark);
    color: white;
    margin: 0 24px 30px;
    padding: 24px;
    border-radius: var(--radius-large);
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(0,0,0,0.25);
}

.hero-card::after {
    content: ''; position: absolute; top: -50%; left: 40%;
    width: 250px; height: 250px; background: #2A2F35;
    border-radius: 50%; opacity: 0.3; z-index: 1;
}

.card-top { display: flex; justify-content: space-between; position: relative; z-index: 2; margin-bottom: 30px; }
.card-brand { font-size: 1rem; font-weight: 800; italic: true; }
.chip { color: #fff; opacity: 0.8; }

.card-balance p { font-size: 0.85rem; opacity: 0.6; margin-bottom: 8px; }
.card-balance h1 { font-size: 1.95rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 24px; }

.card-footer { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.card-footer span { font-size: 0.78rem; opacity: 0.5; }

.mini-suggested {
    background: rgba(255,255,255,0.1); padding: 4px 12px; border-radius: 50px; font-size: 0.7rem; font-weight: 700; color: var(--c-mint);
}

/* --- Quick Actions --- */
.quick-actions {
    display: flex; justify-content: space-between;
    padding: 0 24px 30px;
}

.action-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
}

.action-icon {
    width: 56px; height: 56px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s active;
}

.action-icon:active { transform: scale(0.9); }

.action-ice { background: var(--c-ice); color: var(--c-ice-fg); }
.action-mint { background: var(--c-mint); color: var(--c-mint-fg); }
.action-lavender { background: var(--c-lavender); color: var(--c-lavender-fg); }
.action-peach { background: var(--c-peach); color: var(--c-peach-fg); }

.action-item span { font-size: 0.78rem; font-weight: 600; color: var(--o-label-sec); }

/* --- Friends Gallery --- */
.friends-section { padding: 0 24px 30px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header h3 { font-size: 1.05rem; font-weight: 800; }
.view-all { font-size: 0.78rem; font-weight: 600; text-decoration: none; color: var(--o-label-sec); }

.friends-gallery {
    display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px;
}
.friends-gallery::-webkit-scrollbar { display: none; }

.friend-thumb {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    transition: transform 0.2s;
}

.f-avatar {
    width: 60px; height: 60px; border-radius: 50%;
    background: white; border: 2.5px solid white;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem;
}

.f-name { font-size: 0.78rem; font-weight: 600; color: var(--o-label-sec); }
.f-bal { font-size: 0.75rem; font-weight: 800; }

.f-pos { color: var(--c-mint-fg); }
.f-neg { color: #FF4D4D; }

/* --- Activities --- */
.activities-section { padding: 0 24px 30px; }
.filter-btn {
    background: white; border: none; padding: 4px 10px; border-radius: 8px;
    font-size: 0.72rem; font-weight: 700; color: var(--o-label-sec); box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.activities-list {
    background: white; border-radius: var(--radius-large); padding: 10px;
}

.act-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px; border-bottom: 0.5px solid #F5F5F5;
}
.act-item:last-child { border-bottom: none; }

.act-left { display: flex; align-items: center; gap: 14px; }
.act-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--o-bg); display: flex; align-items: center; justify-content: center; }
.act-info h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 2px; }
.act-info p { font-size: 0.72rem; color: var(--o-label-sec); }
.act-val { font-weight: 800; font-size: 1rem; }

/* --- Floating Navigation --- */
.oalet-nav {
    position: fixed; bottom: calc(20px + var(--safe-area-bottom)); left: 24px; right: 24px;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    height: 70px; border-radius: 35px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 10px; z-index: 1000;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.nav-btn {
    background: none; border: none; width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    color: #C0C0C0; cursor: pointer; border-radius: 50%;
}
.nav-btn.active { color: var(--c-mint-fg); }

.center-btn {
    width: 58px; height: 58px; background: var(--o-dark); color: white;
    border-radius: 50%; box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    margin-top: -15px; border-width: 4px; border-style: solid; border-color: var(--o-white);
}

/* --- Pages --- */
.tab-pane { display: none; animation: fadeIn 0.4s ease; padding: 20px 24px 100px; }
.tab-pane.active { display: block; }
.page-header { margin-bottom: 24px; text-align: center; }
.section-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }

/* --- Tabbed Settle --- */
.settle-item {
    background: white; border-radius: var(--radius-large);
    padding: 20px; display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* --- Oalet Pills --- */
.oalet-pills { display: flex; gap: 8px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.o-pill input { display: none; }
.o-pill span { display: block; padding: 12px 20px; background: #eee; border-radius: 20px; font-weight: 700; font-size: 0.85rem; }
.o-pill input:checked + span { background: var(--o-dark); color: white; }

/* --- Bottom Sheet --- */
.bottom-sheet { position: fixed; inset: 0; z-index: 2000; visibility: hidden; display: flex; align-items: flex-end; }
.bottom-sheet.active { visibility: visible; }
.sheet-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.3s; }
.bottom-sheet.active .sheet-overlay { opacity: 1; }
.sheet-content {
    background: #F8F9FB; width: 100%; border-radius: 30px 30px 0 0;
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    position: relative; max-width: 600px; margin: 0 auto;
}
.bottom-sheet.active .sheet-content { transform: translateY(0); }

.sheet-header { padding: 24px 24px 16px; border-bottom: 1px solid #EEE; display: flex; align-items: center; justify-content: space-between; }
.sheet-body { padding: 24px; }
.btn-close { background: none; border: none; font-weight: 700; color: #777; font-size: 0.9rem; }

.form-group label { font-size: 0.75rem; font-weight: 800; color: var(--o-label-sec); margin-bottom: 8px; display: block; }
.form-group input, .form-group select { width: 100%; padding: 18px 24px; border-radius: 18px; border: 1.5px solid #EEE; background: #FFF; font-size: 1rem; font-family: inherit; outline: none; transition: border-color 0.2s; }
.form-group input:focus { border-color: var(--o-dark); }

.btn-oalet { background: var(--o-dark); color: white; border: none; border-radius: 20px; font-weight: 800; font-size: 1.1rem; padding: 20px; width: 100%; cursor: pointer; transition: transform 0.2s; box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.btn-oalet:active { transform: scale(0.96); }

/* --- Toasts --- */
.toast-container { position: fixed; top: 30px; left: 24px; right: 24px; z-index: 9999; }
.toast { background: var(--o-dark); color: white; border-radius: 16px; padding: 18px 24px; font-weight: 700; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.hidden { display: none !important; }
.empty-state { text-align: center; padding: 80px 40px; color: var(--o-label-muted); font-weight: 600; }
