/* --- TEMA BERSIH & CERAH (GOJEK STYLE) --- */
body {
    margin: 0;
    padding: 0;
    background-color: #f6f7f9; /* Abu-abu sangat muda khas aplikasi ojol */
    color: #1c1c1c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

/* --- STICKY HEADER --- */
.app-header {
    width: 100%;
    max-width: 450px;
    padding: 16px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
    box-sizing: border-box;
}

.app-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #dc2626; /* Merah Royal */
}

/* --- LANDING / INSTALL AREA --- */
.landing-container {
    width: 100%;
    max-width: 450px;
    text-align: center;
    padding: 20px;
    background-color: #ffffff;
    box-sizing: border-box;
    border-bottom: 1px solid #eeeeee;
}

.btn-install {
    background: linear-gradient(135deg, #ff1e27, #d10008);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 14px 28px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: all 0.2s ease;
    margin-bottom: 12px;
    display: none;
}

.btn-install:active {
    transform: scale(0.97);
}

.description {
    color: #4a4a4a;
    line-height: 1.5;
    font-size: 13px;
    margin: 0;
}

.highlight-red {
    color: #dc2626;
    font-weight: 700;
}

/* --- KATALOG & FILTER KATEGORI --- */
.catalog-container {
    width: 100%;
    max-width: 450px;
    padding: 16px 20px;
    /* KUNCI PENYELAMAT: Beri ganjalan bawah (Tinggi Nav 68px + Spasi Aman 32px + Notch HP) */
    padding-bottom: calc(100px + env(safe-area-inset-bottom)); 
    box-sizing: border-box;
    background-color: #ffffff;
    min-height: calc(100vh - 150px);
}

.category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
    display: none; /* Sembunyikan scrollbar biar estetik */
}

.category-btn {
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

/* --- KARTU MENU ANTI-POTONG (DEFENSIVE LAYOUT) --- */
.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-card {
    background-color: #ffffff;
    padding: 14px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    gap: 16px; /* Jarak aman antara teks dan tombol */
}

.menu-info {
    flex: 1; /* KUNCI UTAMA: Mengambil sisa ruang kosong */
    min-width: 0; /* KUNCI UTAMA: Memaksa teks panjang mengalah dan melakukan wrap */
}

.menu-info h4 {
    font-weight: 700;
    font-size: 15px;
    margin: 0;
    color: #1c1c1c;
    white-space: normal; /* Izinkan teks turun ke bawah jika panjang */
    word-break: break-word;
    text-transform: capitalize;
}

.menu-info p {
    color: #757575;
    font-size: 12px;
    margin: 4px 0 0 0;
    white-space: normal;
    word-break: break-word;
}

.menu-action {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0; /* Cegah tombol ringsek tertekan teks */
}

.menu-price {
    color: #1c1c1c;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    white-space: nowrap;
}

.btn-add {
    background-color: #ffffff;
    border: 1px solid #dc2626;
    color: #dc2626;
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add:active {
    background-color: #fff5f5;
    transform: scale(0.95);
}

/* --- BOTTOM NAVIGATION BAR LIGHT --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 68px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-around;
    /* PENTING: Stretch agar container tombol mengambil tinggi penuh 68px */
    align-items: stretch; 
    border-top: 1px solid #eeeeee;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.03);
    box-sizing: border-box;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9e9e9e;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    flex: 1; /* 5 item sekarang (Beranda, Salon, Katering, Profil) berbagi ruang rata */
}

.nav-item.active {
    color: #dc2626; /* Merah menyala kalau tab aktif */
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 4px;
}

.nav-center-holder {
    position: relative;
    width: 75px; /* lebar tetap untuk tombol tengah, bukan lagi 1/3 layar */
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.btn-order-center {
    position: absolute;
    /* Tarik tombol ke atas sejauh 24px saja, jangan terlalu tinggi */
    top: -24px; 
    width: 64px;
    height: 48px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(220, 38, 38, 0.3);
    border: 4px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
}

.center-label {
    position: absolute;
    /* Kunci tulisan 8px dari batas BAWAH layar */
    bottom: 8px; 
    font-size: 11px;
    color: #9e9e9e;
    font-weight: 700;
    white-space: nowrap;
}

.center-label.active-text {
    color: #dc2626;
}

/* --- UI DOMINOS STYLE MENU CARD --- */
.dominos-card {
    background-color: #ffffff;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 16px; /* Jarak antara gambar dan teks */
    transition: all 0.2s ease;
}

/* KIRI: Bungkus Gambar */
.dominos-visual {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}
.dominos-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
}

/* KANAN: Info & Tombol */
.dominos-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.dominos-info h4 {
    font-weight: 700;
    font-size: 15px;
    color: #1c1c1c;
    margin: 0 0 6px 0;
    line-height: 1.3;
}
.dominos-desc {
    font-size: 11px;
    color: #757575;
    background-color: #f3f4f6;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    align-self: flex-start;
    margin: 0 0 10px 0;
}

/* KANAN BAWAH: Harga & Tombol sejajar */
.dominos-action {
    margin-top: auto; /* Dorong ke paling bawah */
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dominos-price {
    font-weight: 800;
    font-size: 16px;
    color: #dc2626; /* Merah menyala */
}
.btn-dominos-add {
    background-color: #fde047; /* Kuning terang ala Domino's */
    color: #1c1c1c;
    font-weight: 800;
    font-size: 13px;
    padding: 6px 20px;
    border-radius: 99px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.btn-dominos-add:active {
    transform: scale(0.95);
    background-color: #facc15;
}
.btn-dominos-add:disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    box-shadow: none;
}
/* ======================================================================
   BLOK DI BAWAH INI DIPINDAHKAN DARI <style> INLINE DI <head> MASING-MASING
   HALAMAN (index.html, app.html, katering.html, salon.html, profil.html)
   supaya semua styling terkumpul di SATU tempat dan gampang di-maintain.
   ====================================================================== */

/* Dipakai di semua halaman ber-Alpine (app, katering, salon, profil):
   sembunyikan elemen sebelum Alpine selesai inisialisasi, biar tidak
   kelihatan "flash" HTML mentah sepersekian detik. */
[x-cloak] { display: none !important; }

/* --- Khusus app.html: animasi getar kotak notifikasi saat user coba
   checkout sebelum mengizinkan notifikasi --- */
@keyframes shakeNotif {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
.shake-notif { animation: shakeNotif 0.5s ease; border-color: #dc2626 !important; }

/* --- Khusus index.html: seksi hero landing/install --- */
.hero-install {
    position: relative;
    width: 100%;
    max-width: 450px;
    min-height: 100vh;
    min-height: 100dvh; /* pakai dynamic viewport height biar gak ada sisa ruang di HP */
    box-sizing: border-box;
    background-image: url('/assets/bg-hero.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 24px;
    overflow: hidden;
    isolation: isolate;
}
.hero-install::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,10,0.62) 0%, rgba(10,10,10,0.38) 45%, rgba(10,10,10,0.68) 100%);
    z-index: 0;
}
.hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.hero-title {
    color: #ffffff;
    font-size: 23px;
    font-weight: 900;
    line-height: 1.35;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-subtitle {
    color: rgba(255,255,255,0.92);
    font-size: 13.5px;
    font-weight: 600;
    margin: 0 0 26px 0;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.btn-install-hero {
    display: none; /* dimunculkan via JS setelah cek dukungan install */
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #ffb648, #ff7a1a 55%, #f2530a);
    border: none;
    border-radius: 20px;
    padding: 14px 22px;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.45), inset 0 1px 0 rgba(255,255,255,0.35);
    text-align: left;
    width: 100%;
    max-width: 340px;
    box-sizing: border-box;
}
.btn-install-hero:active { transform: scale(0.98); }
.btn-install-hero .icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255,255,255,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 20px;
}
.btn-install-hero .btn-text-block { display: flex; flex-direction: column; line-height: 1.15; }
.btn-install-hero .btn-line-1 {
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.02em;
}
.btn-install-hero .btn-line-2 {
    color: rgba(255,255,255,0.95);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}
.ios-tip {
    display: none;
    background: rgba(255,255,255,0.95);
    border: 1px dashed #dc2626;
    color: #7f1d1d;
    font-size: 12px;
    line-height: 1.6;
    padding: 12px 14px;
    border-radius: 12px;
    margin-top: 16px;
    text-align: left;
    max-width: 340px;
    position: relative;
    z-index: 1;
}

/* --- Khusus katering.html --- */
.biz-card {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-radius: 18px;
    padding: 18px 20px;
    color: #ffffff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.biz-card .emoji { font-size: 40px; }
.biz-card h3 { margin: 0 0 3px 0; font-weight: 900; font-size: 17px; }
.biz-card p { margin: 0; font-size: 11px; opacity: 0.9; line-height: 1.5; }

.toggle-row { display: flex; gap: 8px; margin-bottom: 8px; }
.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 11px 8px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #757575;
}
.toggle-btn.active { border-color: #dc2626; background: #fef2f2; color: #dc2626; }
.toggle-btn.sub.active { border-color: #b91c1c; background: #b91c1c; color: #fff; }

.paket-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.paket-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.paket-head .no {
    background: #dc2626;
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 99px;
}
.paket-head .porsi { font-size: 12px; font-weight: 700; color: #757575; }
.paket-domba { font-size: 12px; color: #4a4a4a; font-weight: 700; margin-bottom: 8px; }
.menu-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.menu-chip {
    background: #f3f4f6;
    color: #4a4a4a;
    font-size: 10.5px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
}
.paket-harga { font-size: 20px; font-weight: 900; color: #dc2626; margin-bottom: 12px; }
.btn-wa-paket {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 14px;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-transform: uppercase;
}
.btn-wa-paket:active { transform: scale(0.97); }
.keterangan-box {
    background: #fffbeb;
    border: 1px dashed #fcd34d;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 11.5px;
    color: #92400e;
    line-height: 1.7;
    margin-top: 8px;
}
.keterangan-box b { display: block; margin-bottom: 4px; font-size: 12px; }

/* --- Khusus salon.html --- */
.biz-tab {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #757575;
    transition: all 0.15s ease;
}
.biz-tab.active {
    border-color: #dc2626;
    background: #fef2f2;
    color: #dc2626;
}
.section-title {
    font-size: 13px;
    font-weight: 900;
    color: #b91c1c;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 20px 0 8px 0;
}
.svc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    background: #ffffff;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.svc-row.selected {
    border-color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 2px 8px rgba(220,38,38,0.08);
}
.svc-name { font-weight: 700; font-size: 14px; color: #1c1c1c; }
.svc-note { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.svc-price { font-weight: 800; font-size: 13px; color: #dc2626; white-space: nowrap; }
.slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.slot-btn {
    padding: 9px 0;
    width: calc(25% - 6px);
    text-align: center;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
    color: #4a4a4a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.slot-btn.selected {
    border-color: #dc2626;
    background: #dc2626;
    color: #ffffff;
}
.field-label {
    font-size: 12px;
    font-weight: 800;
    color: #4a4a4a;
    margin: 18px 0 8px 0;
    display: block;
}
.field-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}

/* ======================================================================
   KHUSUS profil.html — dipindahkan dari puluhan inline style="..." jadi
   class reusable, biar HTML-nya enteng dibaca & gampang diubah temanya.
   ====================================================================== */
.riwayat-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-weight: bold;
    font-size: 14px;
}
.riwayat-state.riwayat-empty {
    padding: 40px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
}
.riwayat-state-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 10px;
}
.riwayat-state.riwayat-empty .riwayat-state-icon {
    font-size: 32px;
    color: #d1d5db;
}
.riwayat-state-sub { font-weight: 500; font-size: 12px; }

.riwayat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #f1f1f1;
}
.riwayat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e5e7eb;
}
.riwayat-order-id { font-weight: 900; font-size: 13px; color: #1c1c1c; }
.riwayat-order-date { font-size: 11px; color: #9ca3af; font-weight: 600; }

.riwayat-badge {
    font-size: 10px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 99px;
    text-transform: uppercase;
}
.riwayat-badge-qris { background: #eff6ff; color: #1d4ed8; }
.riwayat-badge-cod { background: #f0fdf4; color: #047857; }
.riwayat-badge-meja { background: #fff7ed; color: #c2410c; }
.riwayat-badge-default { background: #f3f4f6; color: #4b5563; }

.riwayat-items { margin-bottom: 12px; }
.riwayat-item-row { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.riwayat-item-qty { font-weight: 900; color: #dc2626; }
.riwayat-item-name { font-weight: 700; color: #374151; }
.riwayat-item-pedas { font-size: 10px; color: #c2410c; font-weight: 700; }

.riwayat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}
.riwayat-total-label { font-size: 10px; color: #9ca3af; font-weight: 700; }
.riwayat-total-value { font-size: 16px; font-weight: 900; color: #1c1c1c; }

.btn-riwayat-pesan-lagi {
    padding: 10px 18px;
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 900;
    font-size: 12.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.riwayat-toast {
    position: fixed;
    bottom: 100px;
    left: 16px;
    right: 16px;
    background: #1c1c1c;
    color: white;
    padding: 14px 18px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    z-index: 60;
}

/* Animasi kilau cahaya untuk menarik perhatian mata ke tombol utama */
@keyframes shimmer-cta {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-subtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.btn-high-cta {
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-high-cta::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 200%; height: 100%;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: shimmer-cta 4s infinite linear;
    pointer-events: none;
}

.btn-high-cta:active {
    transform: scale(0.97);
    filter: brightness(0.95);
}

.payment-card-modern {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.payment-card-modern:hover {
    border-color: #dc2626;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.12);
    transform: translateY(-2px);
}

.payment-card-modern:active {
    transform: scale(0.98);
}