/* RESET */
body {
    margin: 0;
    padding: 20px;
    background: #f6f6f6;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;    /* dipakai oleh HP modern */
}


/* ===================== */
/*   TOPBAR              */
/* ===================== */
.topbar {
    height: 50px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.topbar-title {
    font-size: 18px;
    font-weight: bold;
}

.topbar-icon {
    font-size: 22px;
    padding: 0 25px;
}

/* ===================== */
/*   SLIDER              */
/* ===================== */

#slider-wrapper {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: calc(100vh - 110px);
    overflow: hidden;
}

#slider {
    display: flex;
    width: 400%;
    height: 100%;
    transition: transform 0.35s ease;
}

/* ===================== */
/*   PAGE SCROLL          */
/* ===================== */
.page {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* smooth scroll di HP */
}


/* ===================== */
/*   NAVBAR              */
/* ===================== */

.navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 60px;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 20;
}

.nav-icon {
    font-size: 20px;
    line-height: 20px;
}

.nav-text {
    font-size: 11px;
    margin-top: 2px;
}

.nav-item.active {
    color: #111;
    font-weight: bold;
}

/* ===================== */
/* HALAMAN AKUN */
/* ===================== */
.akun-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.akun-profile {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.akun-banner,
.akun-header-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.akun-banner,
.akun-header-login {
    background: blue;
    background-size: cover;
    text-align: center;
    color: white;
    min-height: 23px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px 15px;
}

/* FOTO PROFIL */
.akun-foto {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    align-items: center;
    margin-bottom: 6px;
}

/* NAMA USER + EDIT */
#akun-nama {
    margin-top: 4px;
    margin-bottom: 6px;
}

/* Tombol utama */
.btn-primary {
    background: #0096ff;
    border: none;
    padding: 12px 20px;
    color: white;
    font-size: 15px;
    border-radius: 10px;
    margin-top: 10px;
    width: 85%;
}

/* Tombol Edit Profil */
.btn-edit-profile {
    background: #fff;
    color: #0096ff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 4px;
}

/* LINK DAFTAR */
.akun-daftar {
    margin-top: 10px;
}

.link-teks {
    color: #0096ff;
    font-weight: bold;
}

/* LIST MENU */
.akun-menu {
    background: #fff;
    margin-top: 0px;
}

.menu-item {
    height: 30px;
    display: flex;
    align-items: center;
    padding: 15px 16px;
    border-bottom: 1px solid #eee;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-icon {
    width: 24px;
    margin-right: 15px;
}

.menu-arrow {
    margin-left: auto;
    font-size: 20px;
    color: #999;
}

/* UTIL */
.hidden {
    display: none;
}

/* =========================================================
   OVERLAY WRAPPER SLIDE ANIMATION
   ========================================================= */
#overlay-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;

    display: flex;
    flex-direction: column;

    /* dibuat lebih smooth, lebih lembut */
    transition: right 0.55s cubic-bezier(.25, .8, .25, 1);
}

/* Saat overlay aktif */
#overlay-wrapper.active {
    right: 0;
}

/* EFFECT MENU ZOOM (optional) */
.page-zoom {
    transform: scale(0.97);
    transition: transform 0.45s ease;
}

/* =========================================================
   OVERLAY WRAPPER — SINGLE LAYER SYSTEM
   ========================================================= */
#overlay-wrapper {
    position: fixed;      /* <-- ini penting */
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;

    display: flex;
    flex-direction: column;

    transition: right 0.55s cubic-bezier(.25, .8, .25, 1);
}

#overlay-wrapper.active { right: 0; }

/* =========================================================
   HEADER
   ========================================================= */
#overlay-header {
    height: 50px;
    padding: 0 15px;

    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 18px;
    font-weight: 600;

    background: white;
    border-bottom: 1px solid #ddd;

    flex-shrink: 0;
}

#overlay-back {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
}

#overlay-title {
    flex: 1;
}

/* =========================================================
   CONTENT
   ========================================================= */
#overlay-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding: 15px 5px;
    background: #fff;
        width: 100vw;                  /* lebar full layar */
    height: calc(100vh - 110px);   /* 50px topbar + 60px navbar */
    padding: 0;
    
    overflow-y: auto;              /* aktif scroll */
    -webkit-overflow-scrolling: touch;

    display: flex;                 /* untuk center konten */
    flex-direction: column;
    justify-content: flex-start;   /* konten mulai dari atas halaman */
    align-items: center;           /* center horizontal */

    box-sizing: border-box;
}
/* Efek dorong saat overlay muncul */
body.overlay-open #topbar-wrapper,
body.overlay-open #slider-wrapper,
body.overlay-open #navbar-wrapper {
    transform: translateX(-25px);
    transition: transform 0.45s cubic-bezier(.25, .8, .25, 1);
}

/* Kembalikan semua */
#topbar-wrapper,
#slider-wrapper,
#navbar-wrapper {
    transition: transform 0.45s cubic-bezier(.25, .8, .25, 1);
}


/* =========================================================
   SUB OVERLAY — SAME AS MAIN OVERLAY
   ========================================================= */
#overlay-sub {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000; /* lebih tinggi dari overlay utama */

    display: flex;
    flex-direction: column;

    transition: right 0.55s cubic-bezier(.25, .8, .25, 1);
}

#overlay-sub.active {
    right: 0;
}

/* =========================================================
   SUB OVERLAY HEADER (SAMA DENGAN OVERLAY UTAMA)
   ========================================================= */
#overlay-sub-header {
    height: 50px;
    padding: 0 15px;

    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 18px;
    font-weight: 600;

    background: #fff;
    border-bottom: 1px solid #ddd;

    flex-shrink: 0;
}

#overlay-sub-back {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
}

#overlay-sub-title {
    flex: 1;
}

/* =========================================================
   SUB OVERLAY CONTENT (PERSIS SAMA)
   ========================================================= */
#overlay-sub-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding: 15px 5px;
    background: #fff;
        width: 100vw;                  /* lebar full layar */
    height: calc(100vh - 110px);   /* 50px topbar + 60px navbar */
    padding: 0;
    
    overflow-y: auto;              /* aktif scroll */
    -webkit-overflow-scrolling: touch;

    display: flex;                 /* untuk center konten */
    flex-direction: column;
    justify-content: flex-start;   /* konten mulai dari atas halaman */
    align-items: center;           /* center horizontal */

    box-sizing: border-box;
}
