:root {
    --primary: #E53935;
    --primary-dark: #B71C1C;
    --primary-light: #FFCDD2;
    --secondary: #FFA000;
    --secondary-light: #FFF9C4;
    --accent: #FF6F00;
    --bg: #FFF8F5;
    --bg2: #F5F5F5;
    --white: #FFFFFF;
    --text: #212121;
    --text2: #757575;
    --text3: #BDBDBD;
    --success: #43A047;
    --warning: #FB8C00;
    --info: #1E88E5;
    --danger: #E53935;
    --shadow: 0 4px 20px rgba(229, 57, 53, 0.15);
    --shadow2: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 20px;
    --radius-sm: 12px;
    --gradient: linear-gradient(135deg, #E53935 0%, #FF6F00 100%);
    --gradient2: linear-gradient(135deg, #FFA000 0%, #FF6F00 100%);
    --max-width: 480px;

    /* Native Mobile Viewport Variables */
    --vh: 1vh;
    --app-height: 100dvh;
    --app-width: 100%;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100%;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
    background-color: #0f172a;
    overflow-x: clip;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    width: 100%;
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
    margin: 0 auto;
    position: relative;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--safe-top);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

@media (max-width: 580px) {
    body {
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        box-shadow: none;
    }
}

@media (min-width: 581px) {
    body {
        max-width: var(--max-width);
        box-shadow: 0 0 45px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
        min-height: 100vh;
        margin: 0 auto;
    }
}

a { text-decoration: none; color: inherit; }

.page-container {
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.pb-nav, .page-container.pb-nav {
    padding-bottom: calc(110px + var(--safe-bottom, 0px)) !important;
}

/* ===== TOP BAR ===== */
.topbar {
    background: var(--gradient);
    padding: 16px 20px 60px;
    position: relative;
    overflow: hidden;
}
.topbar::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0; right: 0;
    height: 60px;
    background: var(--bg);
    border-radius: 50% 50% 0 0 / 30px 30px 0 0;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
.topbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-logo img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
}
.topbar-logo span {
    font-size: 20px;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
}


.topbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
}
.topbar-greeting {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    position: relative;
    z-index: 1;
    margin-top: 4px;
}
.topbar-greeting strong {
    color: white;
    font-size: 18px;
    display: block;
    font-weight: 700;
}

/* ===== SALDO CARD ===== */
.saldo-card {
    margin: 0 20px;
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
    margin-top: -20px;
}
.saldo-label { font-size: 12px; color: var(--text2); font-weight: 500; }
.saldo-amount {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}
.saldo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topup-btn {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== LAYANAN GRID ===== */
.section { padding: 24px 20px 8px; }
.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.service-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 14px 6px;
    text-align: center;
    box-shadow: var(--shadow2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}
.service-card:hover, .service-card:active {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 10px;
    overflow: hidden;
}
.service-icon.motor { background: linear-gradient(135deg, #FFCDD2, #EF9A9A); }
.service-icon.mobil { background: linear-gradient(135deg, #FFF9C4, #FFF176); }
.service-icon.kurir { background: linear-gradient(135deg, #DCFCE7, #86EFAC); }
.service-icon.kargo { background: linear-gradient(135deg, #FFEDD5, #FED7AA); }
.service-icon.food  { background: linear-gradient(135deg, #FFE0B2, #FFB74D); }
.service-icon.mart  { background: linear-gradient(135deg, #A7F3D0, #6EE7B7); }
.service-icon.travel{ background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 50%, #FEF3C7 100%); border: 1px solid rgba(229, 57, 53, 0.15); }
.service-icon.apotek{ background: linear-gradient(135deg, #FEE2E2, #FECACA); }
.service-name { font-size: 12px; font-weight: 600; color: var(--text); }
.service-card.service-disabled {
    opacity: 0.55;
    filter: grayscale(0.8);
    cursor: not-allowed;
    background: #F8F9FA;
    border: 1.5px dashed #CBD5E1;
    pointer-events: none;
    box-shadow: none;
    transform: none !important;
}
.service-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}
.service-picker-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
}
.admin-service-preview {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 6px;
    background: white;
    border: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}
.admin-service-preview-img {
    width: 30px;
    height: 30px;
    max-width: 30px;
    max-height: 30px;
    object-fit: contain;
    display: block;
}

/* ===== ORDER CARD ===== */
.order-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow2);
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.order-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.order-info { flex: 1; min-width: 0; }
.order-code { font-size: 12px; color: var(--text2); }
.order-route {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-date { font-size: 11px; color: var(--text3); margin-top: 2px; }
.order-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

/* ===== STATUS BADGE ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.badge-pending  { background: #FFF3E0; color: #E65100; }
.badge-accepted { background: #E3F2FD; color: #1565C0; }
.badge-on_the_way { background: #E8F5E9; color: #2E7D32; }
.badge-delivered { background: #E8F5E9; color: #2E7D32; }
.badge-completed { background: #E8F5E9; color: #1B5E20; }
.badge-cancelled { background: #FFEBEE; color: #B71C1C; }
.badge-paid      { background: #E8F5E9; color: #2E7D32; }
.badge-unpaid    { background: #FFF3E0; color: #E65100; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    padding: 8px 12px calc(8px + var(--safe-bottom));
    box-shadow: 0 -4px 25px rgba(0,0,0,0.07);
    z-index: 1000;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px 20px 0 0;
    touch-action: manipulation;
}

@media (min-width: 581px) {
    .bottom-nav {
        max-width: var(--max-width);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    padding: 6px 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}
.nav-item:active {
    transform: scale(0.92);
}
.nav-item span { font-size: 22px; line-height: 1; }
.nav-item.active { color: var(--primary); font-weight: 700; }
.nav-item.active span { filter: drop-shadow(0 2px 6px rgba(229,57,53,0.45)); }

/* ===== PAGE CONTAINER (SCROLLABLE BODY) ===== */
.page-container {
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
    padding-top: calc(64px + var(--safe-top));
    padding-bottom: calc(110px + var(--safe-bottom));
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page-container.no-fixed-header {
    padding-top: 0;
}

.form-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px 20px;
    margin: 20px;
    box-shadow: var(--shadow2);
}

.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #F0F0F0;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: #FAFAFA;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(229,57,53,0.08);
}
.form-control::placeholder { color: var(--text3); }

textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control { cursor: pointer; }

.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 44px; }
.input-icon-wrap .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text3);
}

/* ===== BUTTONS ===== */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: center;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 6px 20px rgba(229,57,53,0.35);
}
.btn-secondary {
    background: var(--gradient2);
    color: white;
    box-shadow: 0 6px 20px rgba(255,160,0,0.35);
}
.btn-outline {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-danger {
    background: linear-gradient(135deg, #B71C1C, #E53935);
    color: white;
}
.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
    width: auto;
    display: inline-block;
    border-radius: 10px;
}

/* ===== ALERT ===== */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #E8F5E9; color: #2E7D32; border-left: 4px solid #43A047; }
.alert-error   { background: #FFEBEE; color: #C62828; border-left: 4px solid #E53935; }
.alert-warning { background: #FFF8E1; color: #E65100; border-left: 4px solid #FFA000; }
.alert-info    { background: #E3F2FD; color: #1565C0; border-left: 4px solid #1E88E5; }

/* ===== AUTH PAGES ===== */
.auth-header {
    background: var(--gradient);
    padding: 50px 24px 80px;
    text-align: center;
    position: relative;
}
.auth-header::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 0; right: 0;
    height: 80px;
    background: var(--bg);
    border-radius: 50%;
}
.auth-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 14px;
    display: block;
    border-radius: 20px;
    background: #ffffff;
    padding: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
.auth-title { font-size: 28px; font-weight: 800; color: white; }
.auth-subtitle { font-size: 14px; color: rgba(255,255,255,0.8); margin-top: 6px; }
.auth-body { padding: 20px 24px; padding-top: 60px; }
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text2);
}
.auth-footer a { color: var(--primary); font-weight: 700; }

/* ===== HERO (Landing) ===== */
.hero {
    background: var(--gradient);
    padding: 50px 24px 90px;
    position: relative;
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '🚗';
    position: absolute;
    right: -10px;
    bottom: 30px;
    font-size: 120px;
    opacity: 0.15;
    transform: rotate(-15deg);
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 0; right: 0;
    height: 80px;
    background: var(--bg);
    border-radius: 50%;
}
.hero-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    margin: 0 auto 18px;
    display: block;
    border-radius: 22px;
    background: #ffffff;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.hero-title { font-size: 32px; font-weight: 900; color: white; line-height: 1.2; }
.hero-subtitle { color: rgba(255,255,255,0.85); margin-top: 10px; font-size: 15px; }
.hero-body { padding: 20px 24px; padding-top: 60px; }

/* ===== LAYANAN CARDS (Landing) ===== */
.feature-list { list-style: none; }
.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F0F0F0;
    font-size: 14px;
    color: var(--text);
}
.feature-list li:last-child { border: none; }
.feature-list .icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* ===== ORDER FORM ===== */
.layanan-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.layanan-option {
    border: 2px solid #F0F0F0;
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}
.layanan-option.active {
    border-color: var(--primary);
    background: #FFF5F5;
}
.layanan-option input { display: none; }
.layanan-option .icon { font-size: 28px; display: block; margin-bottom: 4px; }
.layanan-option .name { font-size: 12px; font-weight: 600; }
.layanan-option .price { font-size: 11px; color: var(--primary); font-weight: 700; }

/* ===== PRICE ESTIMATE ===== */
.price-estimate {
    background: linear-gradient(135deg, #FFF8F5, #FFF3F0);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 6px;
}
.price-row:last-child { margin-bottom: 0; border-top: 1px dashed #FFCDD2; padding-top: 10px; margin-top: 6px; }
.price-total { font-weight: 800; font-size: 18px; color: var(--primary); }

/* ===== DRIVER CARD ===== */
.driver-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 16px;
    box-shadow: var(--shadow2);
    display: flex;
    align-items: center;
    gap: 14px;
}
.driver-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}
.driver-name { font-size: 16px; font-weight: 700; }
.driver-info { font-size: 12px; color: var(--text2); }
.driver-rating { color: var(--secondary); font-size: 13px; font-weight: 600; }

/* ===== PROFILE ===== */
.profile-header {
    background: var(--gradient);
    padding: 40px 20px 70px;
    position: relative;
    text-align: center;
}
.profile-header::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 0; right: 0;
    height: 80px;
    background: var(--bg);
    border-radius: 50%;
}
.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 12px;
    border: 4px solid rgba(255,255,255,0.7);
    position: relative;
    cursor: pointer;
    overflow: visible;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.profile-avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: white;
    color: var(--primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    border: 2px solid white;
    cursor: pointer;
    transition: transform 0.2s;
}
.profile-avatar-badge:hover {
    transform: scale(1.1);
}
.profile-name { font-size: 22px; font-weight: 800; color: white; }
.profile-phone { font-size: 14px; color: rgba(255,255,255,0.8); }

.topbar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.6);
    flex-shrink: 0;
}
.topbar-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.logo-stretch-container {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.25);
}
.logo-stretch {
    width: 100%;
    height: 60px;
    object-fit: fill;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}


.menu-list { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow2); }
.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #F5F5F5;
    cursor: pointer;
    transition: background 0.15s;
}
.menu-item:last-child { border: none; }
.menu-item:active { background: #FFF5F5; }
.menu-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.menu-text { flex: 1; font-size: 15px; font-weight: 500; }
.menu-arrow { color: var(--text3); font-size: 18px; }

/* ===== PAYMENT ===== */
.payment-option {
    border: 2px solid #F0F0F0;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s;
    background: white;
}
.payment-option.active {
    border-color: var(--primary);
    background: #FFF5F5;
}
.payment-option input { display: none; }
.payment-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.payment-text .name { font-size: 15px; font-weight: 700; }
.payment-text .desc { font-size: 12px; color: var(--text2); }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-desc { font-size: 14px; color: var(--text2); }

/* ===== PAGE HEADER (FIXED TOP) ===== */
.page-header {
    background: var(--gradient);
    padding: calc(12px + var(--safe-top)) 16px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(229, 57, 53, 0.2);
    box-sizing: border-box;
    height: calc(58px + var(--safe-top));
}

@media (min-width: 581px) {
    .page-header {
        max-width: var(--max-width);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

.back-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: white; cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.12s ease;
}
.back-btn:active {
    transform: scale(0.92);
    background: rgba(255,255,255,0.35);
}
.page-header-title { font-size: 18px; font-weight: 700; color: white; }

/* ===== STEP INDICATOR ===== */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    gap: 0;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.step-circle {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #F0F0F0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--text3);
}
.step.active .step-circle { background: var(--gradient); color: white; }
.step.done .step-circle { background: var(--success); color: white; }
.step-label { font-size: 10px; color: var(--text3); }
.step.active .step-label, .step.done .step-label { color: var(--text); font-weight: 600; }
.step-line { flex: 1; height: 2px; background: #F0F0F0; margin: 0 4px; margin-bottom: 14px; }
.step-line.done { background: var(--success); }

/* ===== MAP PLACEHOLDER ===== */
.map-placeholder {
    background: linear-gradient(135deg, #E8F5E9, #F3E5F5);
    border-radius: var(--radius-sm);
    height: 160px;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 8px;
    border: 2px dashed #BDBDBD;
    margin-bottom: 16px;
    font-size: 40px;
}
.map-placeholder p { font-size: 13px; color: var(--text2); }

/* ===== SPINNER ===== */
.spinner-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    align-items: center; justify-content: center;
    flex-direction: column; gap: 16px;
}
.spinner-overlay.show { display: flex; }
.spinner {
    width: 50px; height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text { color: white; font-size: 15px; font-weight: 600; }

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999; /* Di atas bottom-nav (z-index: 1000) dan seluruh elemen UI */
    align-items: flex-end; justify-content: center;
    overflow-y: auto;
}
.modal-overlay.show { display: flex; }
.modal {
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 24px 20px calc(35px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: var(--max-width);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.modal-handle {
    width: 40px; height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    margin: 0 auto 20px;
}
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; }

/* ===== DIVIDER ===== */
.divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0; color: var(--text3); font-size: 13px;
}
.divider::before, .divider::after {
    content: ''; flex: 1; height: 1px; background: #F0F0F0;
}

/* ===== FLOATING ACTION ===== */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: white;
    box-shadow: 0 6px 20px rgba(229,57,53,0.4);
    cursor: pointer;
    z-index: 50;
    border: none;
}

/* ===== SCROLL TABS ===== */
.tab-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 20px 16px;
    scrollbar-width: none;
}
.tab-scroll::-webkit-scrollbar { display: none; }
.tab-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: white;
    color: var(--text2);
    border: none;
    box-shadow: var(--shadow2);
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.tab-chip.active { background: var(--gradient); color: white; }

/* ===== UTILS ===== */
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text2); font-size: 13px; }
.fw-bold { font-weight: 700; }
.text-primary { color: var(--primary); }
.pb-nav { padding-bottom: 90px; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ===== MAP & ROUTE STYLING ===== */
.map-card {
    background: white;
    border-radius: var(--radius);
    padding: clamp(12px, 3vw, 16px);
    box-shadow: var(--shadow2);
    margin-bottom: 20px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.map-container {
    height: clamp(260px, 38vh, 440px);
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    z-index: 1;
    border: 1px solid #E2E8F0;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}
.map-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.map-mode-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1.5px solid #E2E8F0;
    background: white;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    touch-action: manipulation;
}
.map-mode-btn:active {
    transform: scale(0.96);
}
.map-mode-btn.active-pickup {
    border-color: #E53935;
    background: #FFEBEE;
    color: #C62828;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.2);
}
.map-mode-btn.active-dest {
    border-color: #2E7D32;
    background: #E8F5E9;
    color: #1B5E20;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}
.map-gps-btn {
    padding: 9px 14px;
    border-radius: 12px;
    border: 1.5px solid #E2E8F0;
    background: white;
    color: var(--info);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    touch-action: manipulation;
}
.map-gps-btn:active {
    transform: scale(0.95);
}
.map-gps-btn:hover {
    background: #E3F2FD;
    border-color: var(--info);
}
.map-search-wrap {
    position: relative;
    margin-bottom: 10px;
}
.map-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: 10px;
    border: 1.5px solid #E0E0E0;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}
.map-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229,57,53,0.1);
}
.map-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text2);
}
.map-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
    display: none;
    border: 1px solid #EEEEEE;
}
.map-search-item {
    padding: 10px 14px;
    font-size: 12px;
    border-bottom: 1px solid #F5F5F5;
    cursor: pointer;
    line-height: 1.4;
}
.map-search-item:hover {
    background: #FFF5F5;
    color: var(--primary);
}
.route-badge {
    background: linear-gradient(135deg, #1E88E5, #1565C0);
    color: white;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(30,136,229,0.25);
}
.custom-pin {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    border: 2px solid white;
}
.pin-pickup { background: #E53935; }
.pin-dest { background: #2E7D32; }

/* ===== DRIVER RADAR MAP MARKERS ===== */
.driver-map-pin {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: white;
    border: 2.5px solid white;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transition: all 0.2s ease;
    cursor: pointer;
}
.driver-map-pin:hover {
    transform: scale(1.15);
    z-index: 1000 !important;
}
.driver-map-pin.motor {
    background: #FFF1F0;
    border-color: #E53935;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}
.driver-map-pin.mobil {
    background: #E0F2FE;
    border-color: #0284C7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}
.driver-map-pin.kurir {
    background: #ECFDF5;
    border-color: #10B981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}
.driver-pin-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* User Pulsing Location Marker */
.user-live-pin {
    width: 18px;
    height: 18px;
    background: #2563EB;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3), 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
}
.user-live-pin::after {
    content: '';
    position: absolute;
    top: -8px; left: -8px;
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid #2563EB;
    animation: user-pulse 1.8s infinite ease-out;
}
@keyframes user-pulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* Radar Filter Pills */
.driver-filter-btn {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #E2E8F0;
    background: white;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.driver-filter-btn.active {
    background: #0F172A;
    color: white;
    border-color: #0F172A;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ===== NATIVE MOBILE OPTIMIZATIONS & PROPORTIONAL LAYOUT ===== */
.form-control, input[type="text"], input[type="password"], input[type="number"], select, textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
    min-height: 46px;
    border-radius: 12px;
}

/* Service Picker Touch Chips */
.layanan-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(8px, 2vw, 12px);
    margin-bottom: 16px;
}
.layanan-option {
    border: 2px solid #F1F5F9;
    border-radius: 14px;
    padding: clamp(10px, 2.5vw, 14px) 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    background: white;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}
.layanan-option:active {
    transform: scale(0.95);
}
.layanan-option.active {
    border-color: var(--primary);
    background: #FFF5F5;
    box-shadow: 0 4px 14px rgba(229, 57, 53, 0.15);
}

/* Floating Action & Submit Bar */
.sticky-bottom-action {
    position: sticky;
    bottom: calc(75px + var(--safe-bottom));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 16px;
    margin: 0 -16px -16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 50;
}

/* Native Card & Touch Improvements */
.card, .form-card, .saldo-card, .order-card, .job-card {
    border-radius: 18px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:active, .order-card:active, .job-card:active {
    transform: scale(0.985);
}

/* Proportional Spacing Utility */
.p-fluid { padding: clamp(12px, 3.5vw, 20px); }
.m-fluid { margin: clamp(12px, 3.5vw, 20px); }
.gap-fluid { gap: clamp(8px, 2.5vw, 14px); }

/* Global Scrollbar & Bounce Behavior */
::-webkit-scrollbar { width: 0px; height: 0px; display: none; }
* { scrollbar-width: none; }

/* ========================================================
   TORI TRAVEL STYLING ENHANCEMENTS
   ======================================================== */
.badge-travel-tiket { background: #E0F2FE; color: #0284C7; border: 1px solid #BAE6FD; }
.badge-travel-hotel { background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; }
.badge-travel-penginapan { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }
.badge-travel-paket { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }
.badge-travel-custom { background: #F3E8FF; color: #7E22CE; border: 1px solid #E9D5FF; }

.badge-travel-confirmed { background: #DBEAFE; color: #1D4ED8; }
.badge-travel-issued    { background: #D1FAE5; color: #065F46; }
.badge-travel-completed { background: #DCFCE7; color: #15803D; }
.badge-travel-cancelled { background: #FEE2E2; color: #991B1B; }

.travel-eticket-card {
    background: #ffffff;
    border-radius: 20px;
    border: 2px dashed #CBD5E1;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}
.travel-eticket-card::before, .travel-eticket-card::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    background: #F8FAFC;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
.travel-eticket-card::before { left: -12px; }
.travel-eticket-card::after  { right: -12px; }

/* ========================================================
   UNIVERSAL AUTO-WRAP & OVERFLOW PREVENTION (UI / UX)
   Memastikan semua elemen & teks yang melebihi lebar layar
   langsung otomatis pindah ke bawah / baris berikutnya
   ======================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: clip;
}

p, span, h1, h2, h3, h4, h5, h6, label, a, strong, b, td, th, li, dt, dd {
    overflow-wrap: break-word;
    word-break: break-word;
}

pre, code {
    white-space: pre-wrap !important;
    word-break: break-all !important;
}

img, svg, video, canvas, audio, iframe {
    max-width: 100%;
    height: auto;
}

/* Tabel responsive aman dari scroll horizontal liar */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Utilitas Flexbox Auto-wrap */
.flex-wrap, .flex-wrap-auto {
    flex-wrap: wrap !important;
}

/* ========================================================
   COMPREHENSIVE MOBILE UI/UX FIXES - AUDIT 2026-09-22
   Memastikan SEMUA konten terlihat & tidak tertutup
   ======================================================== */

/* ─── 1. SALDO CARD - Responsive & tidak overflow ─────── */
.saldo-card {
    min-height: 0;
    overflow: visible;
}
.saldo-row {
    flex-wrap: wrap;
    gap: 10px;
}
.saldo-amount {
    font-size: clamp(18px, 5.5vw, 26px);
    word-break: break-all;
    min-width: 0;
    flex: 1 1 auto;
}
.topup-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: clamp(11px, 3vw, 13px);
    padding: 8px 12px;
}

/* ─── 2. BOTTOM NAV SAFE PADDING ─────────────────────── */
/* Pastikan padding bawah pada semua halaman cukup */
.page-container.pb-nav,
.pb-nav {
    padding-bottom: calc(110px + var(--safe-bottom, 0px)) !important;
}
/* Pastikan konten tidak tersembunyi di balik bottom nav */
.page-container {
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
}

/* ─── 3. SERVICE GRID - Adaptif pada HP kecil ─────────── */
@media (max-width: 360px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .service-card-body {
        padding: 6px 4px 8px !important;
    }
    .service-name {
        font-size: 11px !important;
    }
    .service-rate {
        font-size: 9px !important;
    }
}

/* ─── 4. SALDO STATS ROW - Tidak overflow pada HP kecil ── */
.saldo-stats-row {
    display: flex;
    gap: clamp(12px, 4vw, 24px);
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ─── 5. ORDER CARD - Proporsional pada HP kecil ─────── */
.order-card {
    flex-wrap: nowrap;
    min-width: 0;
}
.order-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.order-route {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.order-price {
    flex-shrink: 0;
    font-size: clamp(13px, 3.5vw, 15px);
}

/* ─── 6. TAB SCROLL - Scroll indicator ───────────────── */
.tab-scroll {
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Extra padding kanan agar tab terakhir tidak terpotong */
    padding-right: 32px !important;
}
.tab-scroll::-webkit-scrollbar { display: none; }

/* ─── 7. HISTORY COMPACT CARD - Mobile safe ──────────── */
.history-compact-card {
    min-width: 0;
    overflow: hidden;
}
.history-compact-left {
    min-width: 0;
    overflow: hidden;
    flex: 1;
}
.history-order-code {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-meta-sub {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-wrap: nowrap;
}
.history-compact-right {
    flex-shrink: 0;
    min-width: 80px;
    max-width: 100px;
}
.history-price-tag {
    font-size: clamp(13px, 3.5vw, 15px);
    white-space: nowrap;
}

/* ─── 8. PROFILE PAGE - Menu tidak tertutup bottom nav ── */
.profile-header {
    padding-top: calc(40px + var(--safe-top, 0px));
}
/* Nama profil tidak overflow */
.profile-name {
    font-size: clamp(18px, 5vw, 22px);
    word-break: break-word;
    max-width: 260px;
    margin: 0 auto;
}
.profile-phone {
    font-size: clamp(12px, 3.2vw, 14px);
}

/* ─── 9. MENU ITEM - Teks panjang tidak overflow ──────── */
.menu-item {
    min-height: 56px;
    flex-wrap: nowrap;
    align-items: center;
}
.menu-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(13px, 3.8vw, 15px);
}
/* Khusus untuk teks menu yang panjang seperti "Portal Mitra..." */
.menu-text.menu-text-wrap {
    white-space: normal;
    line-height: 1.3;
    font-size: clamp(12px, 3.5vw, 14px);
}
.menu-icon {
    flex-shrink: 0;
}
.menu-arrow {
    flex-shrink: 0;
}

/* ─── 10. SALDO CARD PROFILE - tidak overflow ─────────── */
.saldo-card .saldo-row {
    align-items: flex-start;
}

/* ─── 11. PAGE HEADER - Judul tidak overflow ─────────── */
.page-header-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    font-size: clamp(15px, 4.5vw, 18px);
}

/* ─── 12. DRIVER FILTER PILLS - Tidak stuck di tepi ───── */
.driver-filter-pill-wrap {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.driver-filter-pill-wrap::-webkit-scrollbar { display: none; }

/* ─── 13. FORM CONTROLS - Min height untuk touch ─────── */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
    min-height: 50px;
    touch-action: manipulation;
}

/* ─── 14. BUTTON SIZE - Minimum touch target 44px ─────── */
.btn {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-sm {
    min-height: 40px;
}

/* ─── 15. MODAL - Safe bottom area ───────────────────── */
.modal {
    padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ─── 16. BADGE - Tidak overflow pada ruang sempit ─────── */
.badge {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    display: inline-block;
    vertical-align: middle;
}

/* ─── 17. NEARBY DRIVER CARD - Mobile safe ───────────── */
.nearby-driver-card {
    min-width: 0;
    overflow: hidden;
}

/* ─── 18. EMPTY STATE - Proporsional ──────────────────── */
.empty-state {
    padding: clamp(30px, 8vw, 50px) 20px;
}
.empty-icon {
    font-size: clamp(48px, 14vw, 64px);
}
.empty-title {
    font-size: clamp(16px, 4.5vw, 18px);
}
.empty-desc {
    font-size: clamp(13px, 3.5vw, 14px);
}

/* ─── 19. TOPBAR - Tidak overflow pada HP kecil ──────── */
.topbar-greeting strong {
    font-size: clamp(16px, 4.5vw, 18px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}
.topbar-greeting {
    max-width: calc(100% - 56px);
}

/* ─── 20. STATS ROW (SALDO CARD) - Flex wrap safe ─────── */
.saldo-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(8px, 3vw, 24px);
    margin-top: 12px;
}
.saldo-stats-grid > div {
    min-width: 0;
    overflow: hidden;
}
.saldo-stats-grid .stat-value {
    font-size: clamp(14px, 4.5vw, 18px);
    font-weight: 800;
    word-break: break-all;
}
.saldo-stats-grid .stat-label {
    font-size: clamp(9px, 2.5vw, 11px);
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── 21. BACK BUTTON AREA - Min safe tap target ─────── */
.back-btn {
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
}

/* ─── 22. PROMO BANNER - Tidak overflow ─────────────── */
.promo-banner-text {
    overflow: hidden;
    min-width: 0;
}

/* ─── 23. GLOBAL SAFE SCROLL WRAPPER ─────────────────── */
.scroll-x-safe {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.scroll-x-safe::-webkit-scrollbar { display: none; }

/* ─── 24. SECTION HEADER - Flex safe ─────────────────── */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
}
.section-header-row .section-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* ─── 25. TOPBAR AVATAR - Safe wrap ──────────────────── */
.topbar-inner {
    min-width: 0;
}
.topbar-logo {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.topbar-logo span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── 26. GOOGLE PLACES AUTOCOMPLETE FULL ADDRESS DISPLAY ─────── */
/* Menampilkan hasil pencarian alamat lengkap tanpa terpotong      */
.pac-container {
    width: auto !important;
    min-width: 320px !important;
    max-width: min(540px, calc(100vw - 20px)) !important;
    box-sizing: border-box !important;
    z-index: 100005 !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.25) !important;
    border: 1.5px solid #CBD5E1 !important;
    font-family: inherit !important;
    margin-top: 6px !important;
    background-color: #FFFFFF !important;
    overflow: visible !important;
    padding: 6px 0 !important;
}

.pac-item {
    position: relative !important;
    padding: 10px 14px 10px 42px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    border-top: 1px solid #F1F5F9 !important;
    border-bottom: none !important;
    white-space: normal !important;
    height: auto !important;
    min-height: 52px !important;
    line-height: 1.45 !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: block !important;
    text-align: left !important;
    box-sizing: border-box !important;
    transition: background-color 0.15s ease !important;
}

.pac-item:first-child {
    border-top: none !important;
}

.pac-item:hover, .pac-item:focus, .pac-item-selected {
    background-color: #F8FAFC !important;
}

.pac-icon {
    position: absolute !important;
    left: 14px !important;
    top: 13px !important;
    margin-top: 0 !important;
    flex-shrink: 0 !important;
}

.pac-item-query {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    display: block !important;
    white-space: normal !important;
    word-break: break-word !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.35 !important;
    margin-bottom: 3px !important;
    padding-right: 0 !important;
}

.pac-matched {
    font-weight: 800 !important;
    color: #E53935 !important;
}

/* Secondary address text (Kelurahan, Kecamatan, Kota, Kode Pos, dll.) */
.pac-item > span:not(.pac-icon):not(.pac-item-query) {
    font-size: 12px !important;
    color: #64748B !important;
    white-space: normal !important;
    word-break: break-word !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: block !important;
    line-height: 1.4 !important;
}

.pac-item span {
    white-space: normal !important;
    word-break: break-word !important;
}

.pac-logo::after {
    margin-right: 12px !important;
    margin-top: 6px !important;
    margin-bottom: 4px !important;
}

/* Custom Geocode Search Result item (jika digunakan) */
.map-search-item {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}


/* ========================================================
   LANDING (index.php, belum login) — perbaikan Safari iPhone 2026-10-16
   Dicakup lewat body.landing-body ($bodyClass di index.php) agar halaman lain tidak terpengaruh.
   1) Hero gradien menempel sampai atas: tanpa padding header tetap 64px & tanpa padding
      safe-top di body; area status bar (notch) diisi hero lewat padding-top hero.
   2) Tombol Daftar + Masuk muat di layar pertama (ruang kosong di bawah lengkung hero dipangkas,
      tinggi pakai dvh / -webkit-fill-available, bawah memberi ruang safe-area).
   3) "Sudah punya akun?" kontras AA (#4A4A4A di atas #FFF8F5 ≈ 8,5:1), tombol Masuk lebih tegas.
   ======================================================== */
body.landing-body {
    padding-top: 0;
}
body.landing-body .page-container.landing-page {
    padding-top: 0;
    padding-bottom: calc(16px + var(--safe-bottom, 0px));
    min-height: 100vh;
    min-height: -webkit-fill-available;
    min-height: 100dvh;
}
body.landing-body .landing-page .hero {
    padding: calc(28px + var(--safe-top, 0px)) 24px 60px;
}
body.landing-body .landing-page .hero::after {
    bottom: -42px;
    height: 76px;
}
body.landing-body .landing-page .hero-logo {
    width: 76px;
    height: 76px;
    margin-bottom: 14px;
    border-radius: 20px;
}
body.landing-body .landing-page .hero-title {
    font-size: clamp(25px, 7.4vw, 32px);
}
body.landing-body .landing-page .hero-subtitle {
    color: rgba(255,255,255,0.92);
    margin-top: 8px;
    font-size: 14px;
}
body.landing-body .landing-page .hero-body {
    padding: 12px 24px 0;
}
body.landing-body .landing-divider {
    margin: 14px 0;
    color: #4A4A4A;
    font-size: 14px;
    font-weight: 600;
}
body.landing-body .landing-divider::before,
body.landing-body .landing-divider::after {
    background: #D9CFCB;
}
body.landing-body .btn-outline.landing-login {
    background: #FFFFFF;
    color: #B71C1C;
    border: 2px solid #C62828;
    box-shadow: 0 4px 14px rgba(183, 28, 28, 0.18);
}
/* Layar pendek (iPhone SE / Safari dengan toolbar penuh): hero dipadatkan lagi */
@media (max-height: 700px) {
    body.landing-body .landing-page .hero {
        padding-top: calc(18px + var(--safe-top, 0px));
        padding-bottom: 52px;
    }
    body.landing-body .landing-page .hero-logo {
        width: 64px;
        height: 64px;
        padding: 8px;
        margin-bottom: 10px;
    }
    body.landing-body .landing-page .hero-title { font-size: clamp(23px, 6.8vw, 28px); }
    body.landing-body .landing-page .hero-subtitle { font-size: 13px; margin-top: 6px; }
    body.landing-body .landing-page .hero::before { font-size: 96px; }
}
