/* =========================================================
   PWA HOME UTU
   RESET TOTAL — VERSION 1
========================================================= */


/* =========================================================
   01. PWA MODE — MATIKAN WEBSITE NORMAL
========================================================= */

/*
   Saat aplikasi berjalan sebagai PWA:
   SEMUA elemen langsung di dalam body disembunyikan.
   Hanya .pwa-app yang boleh tampil.
*/

html.pwa-mode body > * {
    display: none !important;
}

html.pwa-mode body > .pwa-app {
    display: block !important;
}


/* =========================================================
   02. PWA APP
========================================================= */

html.pwa-mode .pwa-app {
    display: block !important;

    width: 100%;
    min-height: 100vh;

    margin: 0;
    padding: 0 0 88px;

    background: #f6f8fc;

    color: #172b4d;

    font-family:
        "Plus Jakarta Sans",
        Arial,
        sans-serif;

    overflow-x: hidden;
}


/* =========================================================
   03. RESET INTERNAL PWA
========================================================= */

html.pwa-mode .pwa-app *,
html.pwa-mode .pwa-app *::before,
html.pwa-mode .pwa-app *::after {
    box-sizing: border-box;
}


/* =========================================================
   04. PWA HEADER
========================================================= */

html.pwa-mode .pwa-header {
    width: 100%;
    height: 72px;

    display: flex !important;

    align-items: center;
    justify-content: space-between;

    padding: 9px 16px;

    background: #ffffff;

    border-bottom: 1px solid #e8edf4;

    box-shadow:
        0 4px 18px rgba(20, 40, 70, .07);

    position: relative;

    z-index: 100;
}


/* =========================================================
   05. BRAND
========================================================= */

html.pwa-mode .pwa-brand {
    display: flex !important;

    align-items: center;

    gap: 9px;

    min-width: 0;

    text-decoration: none;
}

html.pwa-mode .pwa-brand img {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    object-fit: contain;
}

html.pwa-mode .pwa-brand > div {
    min-width: 0;
}

html.pwa-mode .pwa-brand strong {
    display: block;

    margin: 0;

    color: #003e7e;

    font-size: 14px;
    font-weight: 800;

    line-height: 1.1;
}

html.pwa-mode .pwa-brand span {
    display: block;

    margin-top: 3px;

    color: #6f8094;

    font-size: 8px;
    font-weight: 600;

    line-height: 1.2;

    white-space: nowrap;
}


/* =========================================================
   06. HEADER BUTTON
========================================================= */

html.pwa-mode .pwa-header-actions {
    display: flex !important;

    align-items: center;

    gap: 6px;

    flex-shrink: 0;
}

html.pwa-mode .pwa-notification-btn,
html.pwa-mode .pwa-menu-btn {
    width: 40px;
    height: 40px;

    display: flex !important;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    border-radius: 13px;

    background: #f2effb;

    color: #4f2d9a;

    font-size: 20px;

    position: relative;

    cursor: pointer;
}


/* =========================================================
   07. BADGE
========================================================= */

html.pwa-mode .pwa-notification-badge {
    position: absolute;

    top: -3px;
    right: -3px;

    min-width: 17px;
    height: 17px;

    padding: 0 4px;

    display: flex !important;

    align-items: center;
    justify-content: center;

    border-radius: 50px;

    background: #e53935;

    color: #ffffff;

    font-size: 8px;
    font-weight: 800;

    border: 2px solid #ffffff;
}


/* =========================================================
   08. HERO PWA
========================================================= */

html.pwa-mode .pwa-hero-premium {
    position: relative;

    width: 100%;

    min-height: 420px;

    padding: 42px 22px 105px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #351a73 0%,
            #4f2d9a 52%,
            #6d4aff 100%
        );

    color: #ffffff;
}


/* =========================================================
   09. HERO DECORATION
========================================================= */

html.pwa-mode .pwa-hero-premium::before {
    content: "";

    position: absolute;

    width: 260px;
    height: 260px;

    right: -100px;
    top: -100px;

    border-radius: 50%;

    background: rgba(255,255,255,.08);
}

html.pwa-mode .pwa-hero-premium::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    left: -90px;
    bottom: -90px;

    border-radius: 50%;

    background: rgba(255,255,255,.06);
}


/* =========================================================
   10. HERO CONTENT
========================================================= */

html.pwa-mode .pwa-hero-content {
    position: relative;

    z-index: 2;

    width: 100%;

    max-width: 900px;

    margin: 0 auto;
}

html.pwa-mode .pwa-hero-title {
    position: relative;

    z-index: 5;

    max-width: 580px;
}

html.pwa-mode .pwa-hero-title > span {
    display: inline-block;

    margin-bottom: 10px;

    padding: 6px 10px;

    border-radius: 30px;

    background: rgba(255,255,255,.14);

    color: #ffffff;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1px;

    backdrop-filter: blur(8px);
}

html.pwa-mode .pwa-hero-title h1 {
    margin: 0;

    color: #ffffff;

    font-size: 31px;

    line-height: 1.08;

    font-weight: 400;
}

html.pwa-mode .pwa-hero-title h1 strong {
    font-weight: 800;
}

html.pwa-mode .pwa-hero-title p {
    max-width: 460px;

    margin: 12px 0 0;

    color: rgba(255,255,255,.82);

    font-size: 11px;

    line-height: 1.65;
}


/* =========================================================
   11. GEDUNG
========================================================= */

html.pwa-mode .pwa-hero-image {
    position: absolute;

    right: -15px;
    bottom: 15px;

    width: 52%;

    z-index: 3;

    pointer-events: none;
}

html.pwa-mode .pwa-hero-image img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;

    filter:
        drop-shadow(
            0 18px 25px rgba(0,0,0,.22)
        );
}

html.pwa-mode .pwa-building-glow {
    position: absolute;

    inset: 20% 5% 0;

    border-radius: 50%;

    background: rgba(255,255,255,.13);

    filter: blur(35px);

    z-index: -1;
}


/* =========================================================
   12. SEARCH
========================================================= */

html.pwa-mode .pwa-search-box {
    position: absolute;

    left: 18px;
    right: 18px;
    bottom: 22px;

    z-index: 10;

    padding: 6px;

    display: flex;
    align-items: center;

    background: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 12px 30px rgba(20,20,50,.20);
}

html.pwa-mode .pwa-search-box > i {
    margin-left: 11px;

    color: #6c42d8;

    font-size: 16px;
}

html.pwa-mode .pwa-search-box form {
    width: 100%;

    display: flex;

    align-items: center;
}

html.pwa-mode .pwa-search-box input {
    flex: 1;

    min-width: 0;

    height: 42px;

    padding: 0 10px;

    border: 0;

    outline: 0;

    background: transparent;

    color: #172b4d;

    font-family: inherit;

    font-size: 11px;
}

html.pwa-mode .pwa-search-box input::placeholder {
    color: #9aa6b5;
}

html.pwa-mode .pwa-search-box button {
    height: 40px;

    padding: 0 13px;

    border: 0;

    border-radius: 11px;

    background: #4f2d9a;

    color: #ffffff;

    font-family: inherit;

    font-size: 10px;
    font-weight: 700;
}


/* =========================================================
   13. SECTION
========================================================= */

html.pwa-mode .pwa-section {
    width: 100%;

    padding: 25px 16px;
}


/* =========================================================
   14. SECTION TITLE
========================================================= */

html.pwa-mode .pwa-section-title {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 15px;
}

html.pwa-mode .pwa-section-title > div {
    min-width: 0;
}

html.pwa-mode .pwa-section-title span {
    color: #4f2d9a;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: .5px;
}

html.pwa-mode .pwa-section-title a {
    display: inline-flex;

    align-items: center;

    gap: 3px;

    flex-shrink: 0;

    color: #4f2d9a;

    font-size: 9px;

    font-weight: 700;

    text-decoration: none;
}


/* =========================================================
   15. AKSES CEPAT
========================================================= */

html.pwa-mode .pwa-access-section {
    padding-top: 25px;

    background: #f6f8fc;
}

html.pwa-mode .pwa-access-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 10px;
}

html.pwa-mode .pwa-access-card {
    min-width: 0;

    min-height: 105px;

    padding: 12px 8px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    border-radius: 17px;

    color: #ffffff;

    text-decoration: none;

    box-shadow:
        0 8px 20px rgba(25,35,60,.10);

    position: relative;

    overflow: hidden;
}

html.pwa-mode .pwa-access-card::after {
    content: "";

    position: absolute;

    width: 70px;
    height: 70px;

    right: -30px;
    top: -30px;

    border-radius: 50%;

    background: rgba(255,255,255,.12);
}

html.pwa-mode .pwa-access-icon {
    width: 42px;
    height: 42px;

    margin-bottom: 7px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: rgba(255,255,255,.18);

    font-size: 19px;

    position: relative;

    z-index: 2;
}

html.pwa-mode .pwa-access-card strong {
    position: relative;

    z-index: 2;

    font-size: 9px;

    font-weight: 800;

    line-height: 1.2;
}

html.pwa-mode .pwa-access-card small {
    position: relative;

    z-index: 2;

    margin-top: 4px;

    color: rgba(255,255,255,.78);

    font-size: 7px;

    font-weight: 600;
}


/* WARNA AKSES CEPAT */

html.pwa-mode .card-blue {
    background: linear-gradient(135deg,#0066a8,#003e7e);
}

html.pwa-mode .card-orange {
    background: linear-gradient(135deg,#f59e0b,#e76f00);
}

html.pwa-mode .card-purple {
    background: linear-gradient(135deg,#6d4aff,#4f2d9a);
}

html.pwa-mode .card-green {
    background: linear-gradient(135deg,#18b66b,#087f50);
}


/* =========================================================
   16. DASHBOARD
========================================================= */

html.pwa-mode .pwa-dashboard {
    width: 100%;

    padding: 0 16px 25px;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;
}

html.pwa-mode .pwa-panel {
    min-width: 0;

    padding: 15px;

    background: #ffffff;

    border: 1px solid #edf0f5;

    border-radius: 19px;

    box-shadow:
        0 8px 24px rgba(25,35,60,.07);
}


/* =========================================================
   17. PANEL HEADER
========================================================= */

html.pwa-mode .pwa-panel-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 8px;

    margin-bottom: 13px;
}

html.pwa-mode .pwa-panel-header h2 {
    margin: 0;

    color: #253858;

    font-size: 10px;

    font-weight: 800;

    line-height: 1.3;
}

html.pwa-mode .pwa-panel-header h2 i {
    color: #4f2d9a;

    margin-right: 3px;
}

html.pwa-mode .pwa-panel-header a {
    color: #4f2d9a;

    font-size: 8px;

    font-weight: 700;

    text-decoration: none;

    white-space: nowrap;
}


/* =========================================================
   18. NOTIFICATION
========================================================= */

html.pwa-mode .pwa-notification-list {
    display: flex;

    flex-direction: column;

    gap: 8px;
}

html.pwa-mode .pwa-notification-item {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 9px;

    border-radius: 13px;

    background: #f8f9fc;

    min-width: 0;
}

html.pwa-mode .pwa-notification-icon {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    color: #ffffff;

    font-size: 13px;
}

html.pwa-mode .notification-green .pwa-notification-icon {
    background: #18b66b;
}

html.pwa-mode .notification-blue .pwa-notification-icon {
    background: #2878c8;
}

html.pwa-mode .notification-purple .pwa-notification-icon {
    background: #6d4aff;
}

html.pwa-mode .pwa-notification-content {
    min-width: 0;

    flex: 1;
}

html.pwa-mode .pwa-notification-content span {
    display: block;

    color: #6d4aff;

    font-size: 7px;

    font-weight: 800;

    text-transform: uppercase;
}

html.pwa-mode .pwa-notification-content strong {
    display: block;

    margin-top: 2px;

    color: #27364d;

    font-size: 8px;

    line-height: 1.35;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;
}

html.pwa-mode .pwa-notification-content small {
    display: block;

    margin-top: 2px;

    color: #8b97a7;

    font-size: 7px;

    line-height: 1.3;
}

html.pwa-mode .pwa-notification-item time {
    flex-shrink: 0;

    color: #9aa5b3;

    font-size: 6px;
}


/* =========================================================
   19. BUTTON PANEL
========================================================= */

html.pwa-mode .pwa-all-button {
    margin-top: 10px;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 30px;

    border-radius: 10px;

    background: #f1edff;

    color: #4f2d9a;

    font-size: 8px;

    font-weight: 800;

    text-decoration: none;
}


/* =========================================================
   20. STATISTIK
========================================================= */

html.pwa-mode .pwa-stat-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;
}

html.pwa-mode .pwa-stat-card {
    min-width: 0;

    padding: 10px;

    border-radius: 13px;

    color: #ffffff;

    overflow: hidden;
}

html.pwa-mode .pwa-stat-card i {
    font-size: 15px;
}

html.pwa-mode .pwa-stat-card strong {
    display: block;

    margin-top: 5px;

    font-size: 16px;

    line-height: 1;
}

html.pwa-mode .pwa-stat-card span {
    display: block;

    margin-top: 4px;

    font-size: 7px;

    font-weight: 700;

    opacity: .9;
}

html.pwa-mode .pwa-stat-card small {
    display: block;

    margin-top: 6px;

    font-size: 6px;

    opacity: .75;
}

html.pwa-mode .stat-blue {
    background: linear-gradient(135deg,#087fc1,#005a91);
}

html.pwa-mode .stat-green {
    background: linear-gradient(135deg,#18b66b,#087f50);
}

html.pwa-mode .stat-purple {
    background: linear-gradient(135deg,#7555e8,#4f2d9a);
}

html.pwa-mode .stat-orange {
    background: linear-gradient(135deg,#f59e0b,#dc6900);
}


/* =========================================================
   21. BERITA WEBSITE
========================================================= */

/*
   Berita lama tetap dipakai.
   Untuk sekarang hanya kita pisahkan dari layout PWA.
*/

html.pwa-mode .news-section {
    display: block !important;

    width: 100%;

    padding: 25px 16px 30px;

    background: #f6f8fc;
}


/* =========================================================
   22. BOTTOM NAVIGATION
========================================================= */

html.pwa-mode .pwa-bottom-nav {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 72px;

    display: flex !important;

    align-items: center;
    justify-content: space-around;

    padding: 4px 3px;

    background: rgba(255,255,255,.98);

    border-top: 1px solid #e7ebf2;

    box-shadow:
        0 -8px 25px rgba(20,35,60,.09);

    z-index: 99999;
}

html.pwa-mode .pwa-bottom-nav a,
html.pwa-mode .pwa-bottom-menu {
    flex: 1;

    height: 100%;

    display: flex !important;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 3px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #8995a5;

    font-family: inherit;

    text-decoration: none;

    cursor: pointer;
}

html.pwa-mode .pwa-bottom-nav i {
    font-size: 19px;
}

html.pwa-mode .pwa-bottom-nav span {
    font-size: 7px;

    font-weight: 700;

    white-space: nowrap;
}

html.pwa-mode .pwa-bottom-nav a.active {
    color: #4f2d9a;
}


/* =========================================================
   23. MOBILE
========================================================= */

@media (max-width: 600px) {

    html.pwa-mode .pwa-hero-premium {
        min-height: 410px;

        padding: 35px 17px 105px;
    }

    html.pwa-mode .pwa-hero-title h1 {
        font-size: 28px;
    }

    html.pwa-mode .pwa-hero-title p {
        max-width: 260px;

        font-size: 10px;
    }

    html.pwa-mode .pwa-hero-image {
        width: 55%;

        right: -10px;

        bottom: 45px;
    }

    html.pwa-mode .pwa-search-box {
        left: 14px;
        right: 14px;
    }

    html.pwa-mode .pwa-access-grid {
        grid-template-columns: repeat(2, 1fr);

        gap: 9px;
    }

    html.pwa-mode .pwa-access-card {
        min-height: 105px;
    }

    html.pwa-mode .pwa-dashboard {
        grid-template-columns: 1fr 1fr;

        gap: 9px;

        padding-left: 14px;
        padding-right: 14px;
    }

    html.pwa-mode .pwa-panel {
        padding: 11px;
    }

    html.pwa-mode .pwa-panel-header h2 {
        font-size: 9px;
    }

    html.pwa-mode .pwa-stat-card strong {
        font-size: 14px;
    }

    html.pwa-mode .pwa-news-section {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* =========================================================
   24. HP SANGAT KECIL
========================================================= */

@media (max-width: 380px) {

    html.pwa-mode .pwa-brand strong {
        font-size: 12px;
    }

    html.pwa-mode .pwa-brand span {
        font-size: 6px;
    }

    html.pwa-mode .pwa-hero-title h1 {
        font-size: 25px;
    }

    html.pwa-mode .pwa-access-card {
        min-height: 98px;
    }

    html.pwa-mode .pwa-access-card strong {
        font-size: 8px;
    }

    html.pwa-mode .pwa-dashboard {
        grid-template-columns: 1fr;
    }
}