/*
Theme Name: Mitra Properti Premium App
Theme URI: https://yamanara.com
Author: Yamanara Dev
Description: Tema aplikasi mobile eksklusif, mewah & elegan — biru putih, tampilan mobile-app premium. Logout via POST. Semua intersepsi AJAX & CSS pemblokir popup plugin DIHAPUS total agar plugin berjalan maksimal. (Support WP & PHP 8.3)
Version: 3.0.3
Text Domain: yamanara
*/

/* ============================================================
   PALETTE MEWAH — BLUE × WHITE
   ============================================================ */
:root {
    --primary-orange: #1456A0;          /* dipakai index.php inline — JANGAN dihapus */
    --ynr-orange:      #1456A0;
    --ynr-orange-deep: #0A3470;
    --ynr-orange-lite: #4C91D8;
    --ynr-gradient:    linear-gradient(135deg, #2E78C7 0%, #1456A0 55%, #082E67 100%);
    --ynr-white:       #FFFFFF;
    --ynr-cream:       #F4F8FD;
    --ynr-ink:         #1C1C1E;
    --ynr-muted:       #8E8E93;
    --ynr-line:        rgba(0,0,0,.06);
    --ynr-red:         #E63946;
    --ynr-shadow:      0 14px 36px rgba(8,46,103,.16);
    --ynr-shadow-soft: 0 4px 16px rgba(0,0,0,.05);
    --ynr-radius:      20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Poppins', sans-serif;
    background:
        radial-gradient(700px 340px at 50% -8%, rgba(20,86,160,.10), transparent 70%),
        var(--ynr-cream);
    color: var(--ynr-ink);
    overflow-x: clip; /* menggantikan 'hidden' — tidak memotong/menyembunyikan popup/modal position:fixed plugin */
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(20,86,160,.2); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(20,86,160,.35); border-radius: 3px; }

/* Animasi masuk konten (fade-up) */
.ynr-anim { animation: ynr-fadeup .5s cubic-bezier(.22,1,.36,1) backwards; } /* fill 'backwards' (bukan 'both') agar transform tidak permanen → popup fixed plugin tidak terjebak */
@keyframes ynr-fadeup {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PRELOADER — oranye gradien, logo putih bercahaya + orbit
   ============================================================ */
#app-preloader {
    position: fixed; inset: 0; overflow: hidden;
    background: linear-gradient(145deg, #061d46 0%, #0a3470 48%, #1766af 100%);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; transition: opacity .5s ease;
}
.preloader-glow { position:absolute; width:520px; height:520px; border-radius:50%; background:radial-gradient(circle, rgba(255,255,255,.18), transparent 68%); filter:blur(4px); }
.preloader-wrapper { position:relative; width:250px; height:280px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:18px; }
.preloader-logo-card { width:142px; height:142px; border-radius:38px; background:#fff; display:flex; align-items:center; justify-content:center; padding:13px; box-shadow:0 18px 55px rgba(1,21,52,.42), 0 0 0 8px rgba(255,255,255,.12); z-index:2; }
.preloader-logo { width:100%; height:100%; object-fit:contain; }
.preloader-caption { color:#fff; font-size:13px; letter-spacing:.28em; font-weight:700; text-indent:.28em; opacity:.94; z-index:2; }
.orbit-container { position:absolute; width:215px; height:215px; border-radius:50%; animation:tawaf 3.6s linear infinite; border:1px solid rgba(255,255,255,.32); }
.planet { position:absolute; top:-5px; left:50%; transform:translateX(-50%); width:10px; height:10px; border-radius:50%; background:#fff; box-shadow:0 0 20px rgba(255,255,255,.95); }
@keyframes tawaf { 0% { transform:rotate(0deg); } 100% { transform:rotate(-360deg); } }

/* ============================================================
   HEADER — kaca blur, aksen oranye, tombol hamburger gradien
   ============================================================ */
header.app-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 66px;
    background: rgba(255,255,255,.88);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 18px; z-index: 100; /* diturunkan agar popup plugin (z-index tinggi) tidak pernah tertutup header */
    /* border-bottom garis hitam tipis DIHAPUS — hanya sisakan shadow lembut oranye */
    box-shadow: 0 2px 20px rgba(20,86,160,.07);
}
header.app-header::after {
    content: ''; position: absolute; bottom: -1px; left: 18px; right: 18px; height: 2px;
    background: var(--ynr-gradient); border-radius: 2px; opacity: .9;
}
.header-left img { height: 38px; display: block; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-right img { height: 32px; display: block; }
.hamburger-btn {
    width: 42px; height: 42px; border: none; cursor: pointer;
    border-radius: 14px; background: var(--ynr-gradient); color: #fff;
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(8,46,103,.4);
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
    -webkit-tap-highlight-color: transparent;
}
.hamburger-btn:active { transform: scale(.92); box-shadow: 0 3px 8px rgba(8,46,103,.35); }

/* ============================================================
   KONTEN UTAMA — card putih mewah
   ============================================================ */
#app-wrapper {
    margin-top: 66px;
    margin-bottom: 110px; /* ruang untuk floating nav */
    padding: 22px 16px 40px;
    min-height: calc(100vh - 176px);
    transition: opacity .3s ease;
}

.app-page-content h1 {
    font-size: 22px; font-weight: 800; letter-spacing: -.02em;
    color: var(--ynr-ink); margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
}
.app-page-content h1::before {
    content: ''; width: 5px; height: 24px; border-radius: 3px;
    background: var(--ynr-gradient); display: inline-block;
}
.content-body {
    background: var(--ynr-white);
    border: 1px solid var(--ynr-line);
    border-radius: var(--ynr-radius);
    padding: 22px 18px;
    box-shadow: var(--ynr-shadow-soft);
    line-height: 1.7;
}
.content-body img { max-width: 100%; border-radius: 14px; }

/* ============================================================
   BOTTOM NAV — floating pill mewah (kunci utama tampilan app)
   ============================================================ */
nav.app-bottom-nav {
    position: fixed;
    left: 50%; transform: translateX(-50%);
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 24px); max-width: 480px;
    display: flex; justify-content: space-around; align-items: center;
    gap: 2px; padding: 10px 8px;
    background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    border: 1px solid rgba(20,86,160,.16);
    border-radius: 26px;
    box-shadow: 0 14px 40px rgba(8,46,103,.22), 0 2px 10px rgba(0,0,0,.06);
    z-index: 200; /* diturunkan agar popup plugin tidak tertutup bottom-nav */
    -webkit-tap-highlight-color: transparent;
}
.nav-item {
    flex: 1; position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; border-radius: 16px;
    text-decoration: none; color: var(--ynr-muted);
    font-size: 10px; font-weight: 600; letter-spacing: .01em;
    transition: color .25s, background .25s;
    cursor: pointer;
}
.nav-icon {
    width: 38px; height: 38px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: transform .35s cubic-bezier(.34,1.56,.64,1),
                background .35s, box-shadow .35s, color .35s;
}
.nav-icon i { font-size: 19px; line-height: 1; transition: transform .3s; }
.nav-label { transition: color .25s; }

/* Hover / sentuh */
.nav-item:hover { color: var(--ynr-orange); background: rgba(20,86,160,.06); }
.nav-item:hover .nav-icon i { transform: translateY(-2px) scale(1.08); }

/* STATE AKTIF — ikon mengambang dengan pill gradien oranye + glow */
.nav-item.active .nav-icon {
    background: var(--ynr-gradient); color: #fff;
    transform: translateY(-16px);
    box-shadow: 0 10px 22px rgba(8,46,103,.45),
                0 0 0 4px rgba(20,86,160,.10),
                inset 0 1px 0 rgba(255,255,255,.4);
}
.nav-item.active .nav-icon i { transform: scale(1.05); }
.nav-item.active .nav-label { color: var(--ynr-orange); font-weight: 700; }
.nav-item.active::after {
    content: ''; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--ynr-orange); box-shadow: 0 0 8px var(--ynr-orange);
}

/* === FORM LOGOUT (POST) — reset style button agar identik dengan link === */
.nav-logout-form { flex: 1; display: flex; margin: 0; padding: 0; }
button.nav-item {
    width: 100%; border: none; background: transparent;
    font-family: inherit; -webkit-appearance: none; appearance: none; outline: none;
}
button.nav-item:focus { outline: none; }
button.nav-item:active { transform: scale(.95); }

/* TOMBOL KELUAR — aksen merah elegan + titik pulse */
.nav-item.logout { color: #F2A5A5; }
.nav-item.logout .nav-icon i { color: var(--ynr-red); }
.nav-item.logout:hover { color: var(--ynr-red); background: rgba(230,57,70,.08); }
.nav-item.logout:hover .nav-icon i { transform: translateX(3px) scale(1.1); }
.logout-dot {
    position: absolute; top: 4px; right: calc(50% - 18px);
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ynr-red);
    animation: ynr-pulse 2s infinite;
    pointer-events: none;
}
@keyframes ynr-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(230,57,70,.55); }
    70%  { box-shadow: 0 0 0 8px rgba(230,57,70,0); }
    100% { box-shadow: 0 0 0 0 rgba(230,57,70,0); }
}

/* Layar sangat sempit: sembunyikan label non-aktif */
@media (max-width: 360px) {
    .nav-item:not(.active):not(.logout) .nav-label { display: none; }
    .nav-item { padding: 8px 2px; }
}

/* ============================================================
   SIDEBAR — putih mewah dengan header oranye
   ============================================================ */
.app-sidebar {
    position: fixed; top: 0; right: -320px; width: 290px; height: 100vh;
    background: var(--ynr-white);
    box-shadow: -8px 0 40px rgba(0,0,0,.12);
    z-index: 400;
    transition: right .35s cubic-bezier(.4,0,.2,1);
    padding: 24px 20px; overflow-y: auto;
    border-radius: 24px 0 0 24px;
}
.app-sidebar.open { right: 0; }
.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(28,28,30,.45);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    z-index: 300; display: none; opacity: 0; transition: opacity .3s;
}
.sidebar-overlay.show { display: block; opacity: 1; }
.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; margin: -24px -20px 18px;
    background: var(--ynr-gradient); color: #fff;
    border-radius: 0 0 0 24px;
}
.sidebar-header h3 {
    font-size: 16px; font-weight: 700; color: #fff;
    display: flex; align-items: center; gap: 8px;
}
.close-sidebar {
    font-size: 16px; color: rgba(255,255,255,.9); cursor: pointer;
    width: 32px; height: 32px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.2); transition: all .25s;
}
.close-sidebar:hover { background: rgba(255,255,255,.35); transform: rotate(90deg); }
.app-sidebar ul { list-style: none; }
.app-sidebar ul li { margin-bottom: 6px; }
.app-sidebar ul li a {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--ynr-ink);
    font-weight: 500; font-size: 15px;
    padding: 12px 14px; border-radius: 14px;
    transition: all .25s;
}
.app-sidebar ul li a:hover {
    background: rgba(20,86,160,.08); color: var(--ynr-orange);
    transform: translateX(4px);
}

/* ============================================================
   HILANGKAN GARIS HITAM ATAS (WordPress Admin Bar) di FRONTEND
   Jaring pengaman CSS — meski plugin/cache masih menginject,
   admin bar tetap tidak tampil dan tidak ada jarak kosong di atas.
   ============================================================ */
#wpadminbar { display: none !important; height: 0 !important; }
html { margin-top: 0 !important; }
html body { margin-top: 0 !important; }
body.admin-bar { margin-top: 0 !important; }
body.admin-bar #wpadminbar { display: none !important; }
/* Header app tetap menempel di paling atas (tidak terdorong admin bar) */
header.app-header { top: 0 !important; }

/* MITRA PROPERTI — premium blue-white finishing */
body { background: radial-gradient(700px 340px at 50% -8%, rgba(20,86,160,.11), transparent 70%), var(--ynr-cream); }
header.app-header { height:74px; padding:0 20px; background:rgba(255,255,255,.92); box-shadow:0 5px 26px rgba(8,46,103,.10); }
header.app-header::after { left:20px; right:20px; height:1px; background:linear-gradient(90deg, transparent, #4c91d8, #1456a0, transparent); }
.brand-lockup { display:flex; align-items:center; gap:10px; text-decoration:none; }
.brand-mark { width:42px; height:42px; border-radius:13px; display:flex; align-items:center; justify-content:center; background:#fff; box-shadow:0 5px 14px rgba(8,46,103,.14); overflow:hidden; }
.brand-mark img { width:52px; height:52px; object-fit:contain; }
.brand-name { color:#0a3470; font-size:14px; font-weight:500; letter-spacing:.15em; white-space:nowrap; }
.brand-name strong { font-weight:800; }
.header-right { gap:14px; }
.header-status { color:#55708e; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; display:flex; align-items:center; gap:6px; }
.status-dot { width:6px; height:6px; border-radius:50%; background:#42b883; box-shadow:0 0 0 4px rgba(66,184,131,.13); }
.hamburger-btn { background:linear-gradient(145deg,#2e78c7,#0a3470); box-shadow:0 8px 20px rgba(8,46,103,.28); border-radius:13px; }
#app-wrapper { margin-top:74px; }
.app-page-content h1::before { background:linear-gradient(180deg,#4c91d8,#0a3470); }
.content-body { box-shadow:0 12px 30px rgba(8,46,103,.08); border-color:rgba(20,86,160,.10); }
nav.app-bottom-nav { width:calc(100% - 28px); padding:8px 9px 10px; border-color:rgba(20,86,160,.15); box-shadow:0 16px 42px rgba(8,46,103,.20),0 2px 10px rgba(0,0,0,.05); }
.nav-brand-line { display:none; }
.nav-items { display:flex; width:100%; justify-content:space-around; align-items:center; gap:2px; }
.nav-item.active .nav-icon { background:linear-gradient(145deg,#2e78c7,#0a3470); box-shadow:0 10px 22px rgba(8,46,103,.35),0 0 0 4px rgba(20,86,160,.10),inset 0 1px 0 rgba(255,255,255,.4); }
.app-sidebar { width:310px; padding:0 20px 24px; background:linear-gradient(180deg,#fff 0%,#f5f9fe 100%); }
.sidebar-brand { margin:0 -20px 22px; padding:22px 20px 18px; background:linear-gradient(145deg,#0a3470,#1766af); color:#fff; display:flex; align-items:center; gap:11px; border-radius:0 0 25px 25px; position:relative; }
.sidebar-brand img { width:46px; height:46px; border-radius:13px; object-fit:contain; background:#fff; padding:3px; }
.sidebar-brand div { display:flex; flex-direction:column; gap:3px; }
.sidebar-brand small { font-size:9px; letter-spacing:.1em; opacity:.72; }
.sidebar-brand strong { font-size:12px; letter-spacing:.13em; }
.sidebar-brand .close-sidebar { position:absolute; right:16px; top:16px; background:rgba(255,255,255,.18); }
.sidebar-heading { color:#8aa1bb; text-transform:uppercase; font-size:10px; font-weight:800; letter-spacing:.14em; margin:0 0 10px 4px; }
.app-sidebar ul li a { color:#173657; }
.app-sidebar ul li a:hover { background:rgba(20,86,160,.08); color:#1456a0; }
@media (max-width:420px) { .header-status { display:none; } .brand-name { font-size:12px; letter-spacing:.11em; } }
