/* Mancing Teman — mobile-first, app-like */
:root {
    --mb-primary: #0e7490;
    --mb-primary-dark: #0b4f6c;
    --mb-primary-soft: #e0f4f8;
    --mb-accent: #f59e0b;
    --mb-bg: #f1f6f9;
    --mb-card: #ffffff;
    --mb-text: #12303d;
    --mb-muted: #6b8591;
    --mb-border: #dbe7ec;
    --mb-radius: 18px;
    --mb-nav-h: 64px;
    --bs-primary: #0e7490;
    --bs-primary-rgb: 14, 116, 144;
    --bs-link-color: #0e7490;
    --bs-link-color-rgb: 14, 116, 144;
    --bs-link-hover-color: #0b4f6c;
    --bs-link-hover-color-rgb: 11, 79, 108;
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--mb-text);
    --bs-body-bg: var(--mb-bg);
}

[data-bs-theme="dark"] {
    --mb-primary: #22b8d6;
    --mb-primary-dark: #7bd9ec;
    --mb-primary-soft: #11303a;
    --mb-bg: #0a161c;
    --mb-card: #12232b;
    --mb-text: #e3f0f4;
    --mb-muted: #8fa9b4;
    --mb-border: #223a45;
    --bs-primary: #22b8d6;
    --bs-primary-rgb: 34, 184, 214;
    --bs-link-color: #22b8d6;
    --bs-link-color-rgb: 34, 184, 214;
    --bs-link-hover-color-rgb: 123, 217, 236;
    --bs-body-bg: #0a161c;
    --bs-body-color: #e3f0f4;
}

html { -webkit-tap-highlight-color: transparent; }
body {
    background: var(--mb-bg);
    color: var(--mb-text);
    padding-bottom: calc(var(--mb-nav-h) + env(safe-area-inset-bottom) + 12px);
    overscroll-behavior-y: none;
}
body.no-nav { padding-bottom: 24px; }

/* --- Layout column --- */
.app-wrap { max-width: 720px; margin: 0 auto; }
.app-main { padding: 14px 14px 8px; }

/* --- Top bar --- */
.topbar {
    position: sticky; top: 0; z-index: 1030;
    background: linear-gradient(135deg, var(--mb-primary-dark), var(--mb-primary));
    color: #fff;
    padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
}
.topbar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 10px; min-height: 40px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar .brand { font-weight: 800; letter-spacing: -.3px; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.topbar .title { font-weight: 700; font-size: 1.05rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .icon-btn {
    width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; background: rgba(255, 255, 255, .15); font-size: 1.15rem; border: 0; color: #fff;
}

/* --- Bottom nav --- */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    background: var(--mb-card);
    border-top: 1px solid var(--mb-border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 24px rgba(11, 79, 108, .08);
}
.bottom-nav-inner { max-width: 720px; margin: 0 auto; height: var(--mb-nav-h); display: flex; align-items: stretch; }
.bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; color: var(--mb-muted); text-decoration: none; font-size: .72rem; font-weight: 600; position: relative;
}
.bottom-nav a i { font-size: 1.35rem; line-height: 1; }
.bottom-nav a.active { color: var(--mb-primary); }
.bottom-nav a.active::before {
    content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--mb-primary);
}
.bottom-nav .fab-slot { position: relative; }
.bottom-nav .fab {
    position: absolute; top: -22px; width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--mb-accent), #f97316); color: #fff !important;
    display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
    box-shadow: 0 6px 16px rgba(245, 158, 11, .5); border: 4px solid var(--mb-bg);
}
.bottom-nav .fab i { font-size: 1.6rem; }
.bottom-nav .fab-label { position: absolute; bottom: 5px; font-size: .72rem; color: var(--mb-muted); font-weight: 600; }
.nav-badge {
    position: absolute; top: 7px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: #ef4444; color: #fff; font-size: .62rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* --- Cards --- */
.card { border: 1px solid var(--mb-border); border-radius: var(--mb-radius); background: var(--mb-card); }
.card-soft { background: var(--mb-card); border-radius: var(--mb-radius); border: 1px solid var(--mb-border); padding: 16px; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mb-muted); font-weight: 700; margin: 18px 4px 8px; }

.room-card { display: block; text-decoration: none; color: inherit; padding: 14px; margin-bottom: 12px; transition: transform .12s, box-shadow .12s; }
.room-card:active { transform: scale(.985); }
.room-card:hover { color: inherit; box-shadow: 0 6px 20px rgba(14, 116, 144, .12); }
.room-date { align-self: flex-start;
    min-width: 56px; text-align: center; border-radius: 14px; padding: 6px 4px;
    background: var(--mb-primary-soft); color: var(--mb-primary); line-height: 1.1;
}
.room-date .d { font-size: 1.45rem; font-weight: 800; }
.room-date .m { font-size: .75rem; text-transform: uppercase; font-weight: 700; }
.room-date .w { font-size: .75rem; font-weight: 600; opacity: .85; }
.room-title { font-weight: 800; font-size: 1.02rem; line-height: 1.25; margin: 0; }
.meta-line { color: var(--mb-muted); font-size: .84rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.chip {
    display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px;
    font-size: .74rem; font-weight: 700; background: var(--mb-primary-soft); color: var(--mb-primary);
    white-space: nowrap;
}
.chip-warm { background: #fff4dc; color: #b45309; }
.chip-green { background: #dcfce7; color: #15803d; }
.chip-red { background: #fee2e2; color: #b91c1c; }
.chip-gray { background: #eef2f4; color: #51666f; }
[data-bs-theme="dark"] .chip-warm { background: #3a2b0c; color: #fbbf24; }
[data-bs-theme="dark"] .chip-green { background: #0f3320; color: #4ade80; }
[data-bs-theme="dark"] .chip-red { background: #3d1515; color: #f87171; }
[data-bs-theme="dark"] .chip-gray { background: #1c2f38; color: #9fb7c1; }

/* --- Avatar --- */
.avatar {
    width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .9rem;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar-lg { width: 84px; height: 84px; font-size: 1.9rem; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid var(--mb-card); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* --- Forms --- */
.form-control, .form-select { border-radius: 12px; padding: .65rem .85rem; border-color: var(--mb-border); background-color: var(--mb-card); color: var(--mb-text); }
.form-control:focus, .form-select:focus { border-color: var(--mb-primary); box-shadow: 0 0 0 .2rem rgba(14, 116, 144, .15); }
.form-label { font-weight: 700; font-size: .85rem; margin-bottom: 4px; }
.btn { border-radius: 14px; font-weight: 700; padding: .65rem 1.1rem; }
.btn-primary { --bs-btn-bg: var(--mb-primary); --bs-btn-border-color: var(--mb-primary); --bs-btn-hover-bg: var(--mb-primary-dark); --bs-btn-hover-border-color: var(--mb-primary-dark); --bs-btn-active-bg: var(--mb-primary-dark); --bs-btn-disabled-bg: var(--mb-primary); }
.btn-outline-primary { --bs-btn-color: var(--mb-primary); --bs-btn-border-color: var(--mb-primary); --bs-btn-hover-bg: var(--mb-primary); --bs-btn-hover-border-color: var(--mb-primary); --bs-btn-active-bg: var(--mb-primary); }
.btn-accent { background: linear-gradient(135deg, var(--mb-accent), #f97316); border: 0; color: #fff; }
.btn-accent:hover { color: #fff; filter: brightness(.95); }
.btn-lg { padding: .85rem 1.2rem; }
.btn-sm { padding: .35rem .75rem; border-radius: 10px; }

/* --- Pick tiles (spot types, checklists) --- */
.pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pick-tile { position: relative; }
.pick-tile input { position: absolute; opacity: 0; pointer-events: none; }
.pick-tile label {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px; height: 100%;
    border: 2px solid var(--mb-border); border-radius: 16px; background: var(--mb-card); cursor: pointer;
    transition: border-color .12s, background .12s;
}
.pick-tile label .ico { font-size: 1.4rem; color: var(--mb-primary); line-height: 1; }
.pick-tile label .nm { font-weight: 700; font-size: .86rem; line-height: 1.2; }
.pick-tile label .ds { font-size: .72rem; color: var(--mb-muted); margin-top: 2px; line-height: 1.25; }
.pick-tile input:checked + label { border-color: var(--mb-primary); background: var(--mb-primary-soft); }
.pick-tile input:focus-visible + label { outline: 3px solid rgba(14, 116, 144, .35); }
.pick-tile input:checked + label::after {
    content: '\F26A'; font-family: 'bootstrap-icons'; position: absolute; top: 8px; right: 10px; color: var(--mb-primary); font-size: 1rem;
}
.pick-list .pick-tile label { padding: 10px 12px; align-items: center; }
.pick-list { display: grid; gap: 8px; }

.chip-check { display: inline-block; position: relative; margin: 0 4px 6px 0; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check label { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--mb-border); font-size: .8rem; font-weight: 600; cursor: pointer; background: var(--mb-card); }
.chip-check input:checked + label { background: var(--mb-primary); border-color: var(--mb-primary); color: #fff; }

/* --- Quick filter chips --- */
.scroll-x { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x .qchip {
    flex-shrink: 0; padding: 7px 14px; border-radius: 999px; background: var(--mb-card); border: 1.5px solid var(--mb-border);
    font-size: .8rem; font-weight: 700; color: var(--mb-text); text-decoration: none;
}
.scroll-x .qchip.active { background: var(--mb-primary); color: #fff; border-color: var(--mb-primary); }

/* --- Info box --- */
.info-item { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--mb-border); font-size: .9rem; }
.info-item:last-child { border-bottom: 0; }
.info-item i { color: var(--mb-primary); font-size: 1.15rem; width: 24px; text-align: center; }

.boat-box { background: linear-gradient(135deg, #fff7e0, #ffe9b8); border: 1px solid #f6d27a; color: #5b3a05; border-radius: var(--mb-radius); padding: 14px; }
[data-bs-theme="dark"] .boat-box { background: linear-gradient(135deg, #3a2b0c, #4a350d); border-color: #6b4d12; color: #fde8b0; }
.boat-price { font-size: 1.5rem; font-weight: 800; }

.weather-box { border-radius: var(--mb-radius); padding: 14px; color: #fff; background: linear-gradient(135deg, #0b4f6c, #0e7490); }
.weather-box .wx-icon { font-size: 2.2rem; }
.weather-box .wx-stat { background: rgba(255, 255, 255, .15); border-radius: 12px; padding: 6px 4px; text-align: center; font-size: .72rem; }
.weather-box .wx-stat b { display: block; font-size: 1rem; }

/* --- Chat --- */
body.chat-page { padding-bottom: 0; overflow: hidden; }
.chat-shell { display: flex; flex-direction: column; height: calc(100dvh - 62px - env(safe-area-inset-top)); max-width: 720px; margin: 0 auto; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 82%; display: flex; flex-direction: column; }
.msg .bubble { padding: 8px 12px; border-radius: 16px; font-size: .92rem; line-height: 1.35; word-break: break-word; white-space: pre-wrap; background: var(--mb-card); border: 1px solid var(--mb-border); border-bottom-left-radius: 4px; }
.msg .who { font-size: .78rem; font-weight: 700; margin: 0 6px 2px; }
.msg .time { font-size: .72rem; color: var(--mb-muted); margin: 2px 6px 0; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .bubble { background: var(--mb-primary); color: #fff; border: 0; border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.day-sep { align-self: center; font-size: .75rem; background: var(--mb-primary-soft); color: var(--mb-primary); padding: 2px 10px; border-radius: 999px; font-weight: 700; margin: 6px 0; }
.chat-input { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--mb-card); border-top: 1px solid var(--mb-border); display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { resize: none; max-height: 110px; }
.chat-input .btn { width: 46px; height: 46px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; }

/* --- Landing --- */
.hero {
    background: radial-gradient(circle at 80% 0%, rgba(245, 158, 11, .35), transparent 45%), linear-gradient(160deg, #083a50, #0e7490 70%, #22b8d6);
    color: #fff; padding: calc(env(safe-area-inset-top) + 40px) 20px 70px; border-radius: 0 0 36px 36px; text-align: center;
}
.hero h1 { font-weight: 800; letter-spacing: -.8px; font-size: 2rem; }
.feature { display: flex; gap: 14px; padding: 14px; }
.feature .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--mb-primary-soft); color: var(--mb-primary); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }

.stat-tile { text-align: center; padding: 10px 4px; background: var(--mb-primary-soft); border-radius: 14px; }
.stat-tile b { display: block; font-size: 1.2rem; font-weight: 800; color: var(--mb-primary); }
.stat-tile span { font-size: .75rem; color: var(--mb-muted); font-weight: 700; text-transform: uppercase; }

.profile-head { background: linear-gradient(135deg, var(--mb-primary-dark), var(--mb-primary)); color: #fff; margin: -14px -14px 0; padding: 24px 14px 56px; text-align: center; }
.profile-card { margin-top: -40px; }

.empty { text-align: center; padding: 36px 16px; color: var(--mb-muted); }
.empty i { font-size: 2.6rem; opacity: .5; }

.alert { border-radius: 14px; border: 0; font-size: .9rem; }
.pagination { justify-content: center; }
.page-link { border-radius: 10px !important; margin: 0 2px; }

@media (min-width: 768px) {
    body { background: linear-gradient(180deg, #dcebf1, var(--mb-bg)); }
    .app-wrap { background: var(--mb-bg); min-height: 100vh; box-shadow: 0 0 40px rgba(11, 79, 108, .12); }
}

/* --- Tap targets (min ~44px area untuk link teks) --- */
.tap-link { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
.topbar .brand { min-height: 44px; }
.topbar .brand:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(245, 158, 11, .6); outline-offset: 2px; }

/* --- Foto --- */
img.avatar { object-fit: cover; }
.cover-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; display: block; }
.card-cover { width: calc(100% + 28px); margin: -14px -14px 12px; height: 120px; object-fit: cover; border-radius: var(--mb-radius) var(--mb-radius) 0 0; display: block; }
.photo-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; display: block; }
.legal h2 { font-size: 1rem; font-weight: 800; margin: 18px 0 6px; color: var(--mb-primary); }
.legal ul { padding-left: 1.1rem; font-size: .92rem; }
.legal p { font-size: .92rem; }

footer a { display: inline-block; padding: 12px 8px; }

/* --- Galeri --- */
.g-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.g-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--mb-primary-soft); }
.g-tile img, .g-tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.g-tile:active { opacity: .85; }
.g-badge { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.g-lock { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .7rem; }
.g-likes { position: absolute; bottom: 5px; left: 5px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; font-weight: 700; }
.g-media { border-radius: var(--mb-radius); overflow: hidden; background: #000; text-align: center; }
.g-media img, .g-media video { width: 100%; max-height: 72vh; object-fit: contain; display: block; margin: 0 auto; }
@media (min-width: 576px) { .g-grid { gap: 6px; } }

/* --- Shop --- */
.p-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 576px) { .p-grid { grid-template-columns: repeat(3, 1fr); } }
.p-card { display: block; text-decoration: none; color: inherit; background: var(--mb-card); border: 1px solid var(--mb-border); border-radius: var(--mb-radius); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.p-card:active { transform: scale(.985); }
.p-card:hover { color: inherit; box-shadow: 0 6px 20px rgba(14, 116, 144, .12); }
.p-img { position: relative; aspect-ratio: 1; background: var(--mb-primary-soft); display: flex; align-items: center; justify-content: center; color: var(--mb-muted); font-size: 2.2rem; }
.p-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-badge { position: absolute; top: 8px; left: 8px; background: #dc2626; color: #fff; font-size: .75rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.p-body { padding: 10px 12px 12px; }
.p-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mb-muted); font-weight: 700; }
.p-name { font-weight: 700; font-size: .9rem; line-height: 1.25; margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.25em; }
.p-price { font-weight: 800; color: var(--mb-primary); }
.p-hero { background: var(--mb-primary-soft); }
.p-hero img { max-height: 420px; object-fit: contain; background: #fff; }
.p-noimg { height: 240px; display: flex; align-items: center; justify-content: center; color: var(--mb-muted); font-size: 3rem; }
.p-thumb { flex-shrink: 0; width: 64px; height: 64px; padding: 0; border: 2px solid var(--mb-border); border-radius: 12px; overflow: hidden; background: var(--mb-card); }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-thumb.active { border-color: var(--mb-primary); }
.p-thumb-lg { flex-shrink: 0; width: 72px; height: 72px; border-radius: 14px; overflow: hidden; background: var(--mb-primary-soft); display: flex; align-items: center; justify-content: center; color: var(--mb-muted); font-size: 1.6rem; text-decoration: none; }
.p-thumb-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qty-box { display: inline-flex; align-items: center; border: 1.5px solid var(--mb-border); border-radius: 14px; overflow: hidden; background: var(--mb-card); }
.qty-btn { width: 40px; height: 42px; border: 0; background: transparent; font-size: 1.25rem; font-weight: 700; color: var(--mb-primary); }
.qty-btn:active { background: var(--mb-primary-soft); }
.qty-input { width: 48px; height: 42px; border: 0; text-align: center; font-weight: 700; background: transparent; color: var(--mb-text); -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bank-box { background: var(--mb-primary-soft); border-radius: 12px; padding: 10px 12px; font-family: inherit; font-size: .88rem; white-space: pre-wrap; color: var(--mb-text); }
.proof-img { max-width: 100%; max-height: 260px; border-radius: 12px; border: 1px solid var(--mb-border); display: block; }
.timeline { position: relative; padding-left: 18px; border-left: 2px solid var(--mb-border); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 14px 4px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--mb-primary); border: 2px solid var(--mb-card); }
.admin-tabs .qchip .badge { font-size: .65rem; }

/* --- Tutorial pengenalan --- */
.tour { position: fixed; inset: 0; z-index: 2000; }
.tour-block { position: absolute; inset: 0; }
.tour-spot { position: fixed; border-radius: 16px; box-shadow: 0 0 0 4px #f59e0b, 0 0 0 9999px rgba(6, 40, 56, .72); transition: left .25s, top .25s, width .25s, height .25s; pointer-events: none; }
.tour-spot.tour-spot-none { box-shadow: 0 0 0 9999px rgba(6, 40, 56, .72); border-radius: 0; }
.tour-card { position: fixed; left: 50%; transform: translateX(-50%); width: min(92vw, 420px); background: var(--mb-card); color: var(--mb-text); border-radius: 20px; padding: 18px 18px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); z-index: 2002; }
.tour-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--mb-primary-soft); color: var(--mb-primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.tour-dots { display: flex; gap: 6px; justify-content: center; }
.tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--mb-border); }
.tour-dots span.on { width: 20px; border-radius: 4px; background: var(--mb-primary); }
body.tour-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }
