/* =========================================================
   Koperasi AJA - Member App Shell
   ========================================================= */

.app-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 88px;
}

@media (min-width: 481px) {
    body.member-body { background: #dfe9e4; }
    .app-shell {
        min-height: calc(100vh - 40px);
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 28px;
        box-shadow: var(--shadow-lg);
        overflow: hidden;
    }
}

/* ---------- Top bar ---------- */
.topbar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 20px 20px 26px;
    border-radius: 0 0 24px 24px;
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; }
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-brand .mark {
    width: 38px; height: 38px; border-radius: 11px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
}
.topbar-brand .name { font-size: 13.5px; font-weight: 800; line-height: 1.1; }
.topbar-brand .tag { font-size: 11px; color: rgba(255,255,255,0.75); }
.topbar-icon-btn {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.16);
    display: flex; align-items: center; justify-content: center;
    color: #fff; border: none; cursor: pointer; position: relative;
}
.topbar-icon-btn .dot {
    position: absolute; top: 7px; right: 8px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); border: 1.5px solid var(--primary-dark);
}
.topbar-greeting { margin-top: 18px; }
.topbar-greeting .hi { font-size: 13px; color: rgba(255,255,255,0.8); }
.topbar-greeting .who { font-size: 20px; font-weight: 800; }

/* ---------- Content ---------- */
.page {
    padding: 18px 18px 4px;
}
.section-title {
    display: flex; align-items: center; justify-content: space-between;
    margin: 22px 0 12px;
}
.section-title h3 { font-size: 15px; font-weight: 800; }
.section-title a { font-size: 12.5px; font-weight: 700; color: var(--primary-dark); }

/* ---------- Balance / stat card ---------- */
.balance-card {
    margin-top: -34px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    position: relative;
    z-index: 2;
}
.balance-card .label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.balance-card .value { font-size: 26px; font-weight: 800; margin-top: 2px; }
.balance-card .meta { display: flex; gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.balance-card .meta-item .k { font-size: 11.5px; color: var(--ink-soft); }
.balance-card .meta-item .v { font-size: 14px; font-weight: 700; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-mini {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 14px;
}
.stat-mini .icon {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
}
.stat-mini .k { font-size: 12px; color: var(--ink-soft); }
.stat-mini .v { font-size: 16px; font-weight: 800; }

/* ---------- Quick menu ---------- */
.quick-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-menu a {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    text-align: center; color: var(--ink);
}
.quick-menu .qi {
    width: 52px; height: 52px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-dark);
}
.quick-menu span { font-size: 11.5px; font-weight: 600; }

/* ---------- List item (menu / activity rows) ---------- */
.list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
}
.list-item .li-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--primary-light); color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 14px; font-weight: 700; }
.list-item .li-sub { font-size: 12px; color: var(--ink-soft); }
.list-item .li-chev { color: var(--muted); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.empty-state .ico { color: var(--muted); margin-bottom: 10px; }

/* ---------- Bottom navigation ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: var(--surface);
    border-top: 1px solid var(--line);
    display: flex;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px -12px rgba(22,33,29,0.12);
    z-index: 20;
}
.bottom-nav a {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 0;
    color: var(--muted);
    font-size: 11px; font-weight: 600;
    border-radius: 12px;
}
.bottom-nav a.active { color: var(--primary-dark); background: var(--primary-light); }
.bottom-nav svg { width: 21px; height: 21px; }

/* ---------- Profile ---------- */
.profile-header { text-align: center; padding: 8px 0 4px; }
.profile-header .avatar { width: 78px; height: 78px; font-size: 28px; margin: 0 auto 10px; box-shadow: var(--shadow); }
.profile-header .name { font-size: 17px; font-weight: 800; }
.profile-header .email { font-size: 13px; color: var(--ink-soft); }

.info-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: none; }
.info-row .k { font-size: 13px; color: var(--ink-soft); }
.info-row .v { font-size: 13.5px; font-weight: 700; text-align: right; }
