/* =====================================================
   rute.css — Smart Waste Monitor
   Tema: Putih & Biru — Bersih & Profesional
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: #f0f4f8;
    font-family: 'Inter', sans-serif;
    color: #1e3a5f;
    min-height: 100vh;
    padding: 20px 16px 40px;
    font-size: 14px;
    line-height: 1.5;
}

.dash-wrapper { max-width: 1100px; margin: 0 auto; }

/* ===== CARD ===== */
.glass-card {
    background: #ffffff;
    border: 1px solid #d0dce8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.glass-card-inner { padding: 20px 22px; }

/* ===== HEADER ===== */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d0dce8;
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.dash-header-left { display: flex; align-items: center; gap: 14px; }

.header-logo {
    width: 42px; height: 42px;
    border-radius: 8px;
    background: #1a56db;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}

.header-title { font-size: 1rem; font-weight: 700; color: #1e3a5f; }

.header-subtitle { font-size: 0.68rem; color: #6b8aaa; margin-top: 2px; }

/* ===== BACK BUTTON ===== */
.btn-back {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 6px;
    background: #eff4ff;
    border: 1px solid #c8d8f0;
    color: #1a56db;
    font-size: 0.80rem; font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-back:hover { background: #dce8ff; color: #1a56db; }

/* ===== NAVIGATION ===== */
.dash-nav {
    display: flex; gap: 3px;
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #d0dce8;
    border-radius: 8px; padding: 4px;
    width: fit-content;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 5px;
    text-decoration: none;
    font-size: 0.82rem; font-weight: 500;
    color: #6b8aaa;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.nav-item:hover { color: #1a56db; background: #e8eef8; }

.nav-item.active {
    background: #1a56db;
    color: #ffffff;
    font-weight: 600;
}

/* ===== SECTION LABEL ===== */
.section-label {
    font-size: 0.65rem; font-weight: 700; color: #6b8aaa;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 6px; display: block;
}

/* ===== INFO FIELD ===== */
.info-field {
    background: #f8fafd;
    border: 1px solid #d0dce8;
    border-radius: 6px;
    padding: 9px 13px;
    font-size: 0.83rem; font-weight: 600;
    color: #1e3a5f; width: 100%;
}

.field-danger {
    border-color: #fecaca;
    color: #dc2626;
    background: #fef2f2;
}

/* ===== HITUNG BUTTON ===== */
.btn-hitung {
    width: 100%; padding: 10px;
    background: #1a56db;
    border: 1px solid #1446b8;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.88rem; font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    letter-spacing: 0.2px;
}
.btn-hitung:hover  { background: #1446b8; }
.btn-hitung:active { background: #1038a0; }

/* ===== FORM SECTION ===== */
.form-section { margin-bottom: 16px; }

/* ===== MAP ===== */
#map {
    height: 440px; width: 100%;
    border-top: 1px solid #d0dce8;
}

.map-header {
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #e8eef8;
    background: #f8fafd;
}

.map-legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.legend-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.68rem; font-weight: 500; color: #6b8aaa;
}

/* Hide Leaflet routing panel */
.leaflet-routing-container { display: none !important; }

/* ===== PRIORITY LIST ===== */
.priority-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}

.priority-icon {
    width: 32px; height: 32px; border-radius: 7px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #dc2626;
}

.priority-title { font-size: 0.88rem; font-weight: 700; color: #1e3a5f; }
.priority-sub   { font-size: 0.65rem; color: #6b8aaa; margin-top: 1px; }

.priority-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px;
    background: #f8fafd;
    border: 1px solid #e0e8f4;
    border-radius: 7px;
    margin-bottom: 7px;
    transition: background 0.1s;
}

.priority-item:last-child { margin-bottom: 0; }
.priority-item:hover { background: #eff4ff; }

.priority-num {
    width: 20px; height: 20px; border-radius: 5px;
    background: #fef2f2; color: #dc2626;
    font-size: 0.60rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px;
    border: 1px solid #fecaca;
}

.priority-name {
    font-size: 0.82rem; font-weight: 600;
    color: #1e3a5f; line-height: 1.3;
}

.badge-wajib {
    display: inline-block; margin-top: 3px;
    font-size: 0.58rem; font-weight: 700; padding: 2px 6px;
    border-radius: 4px; letter-spacing: 0.3px; text-transform: uppercase;
    background: #fef2f2; color: #dc2626;
    border: 1px solid #fecaca;
}

.empty-state { text-align: center; padding: 28px 16px; }
.empty-state-icon  { font-size: 2rem; margin-bottom: 8px; opacity: 0.4; }
.empty-state-title { font-size: 0.85rem; font-weight: 600; color: #6b8aaa; }
.empty-state-sub   { font-size: 0.70rem; color: #a0b4cc; margin-top: 4px; }

/* ===== RESULT SECTION ===== */
.result-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }

.result-icon {
    width: 32px; height: 32px; border-radius: 7px;
    background: #eff4ff; border: 1px solid #c8d8f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #1a56db;
}

.result-title { font-size: 0.88rem; font-weight: 700; color: #1e3a5f; }
.result-sub   { font-size: 0.65rem; color: #6b8aaa; margin-top: 1px; }

/* ===== DISTANCE BANNER ===== */
.distance-banner {
    background: #eff4ff;
    border: 1px solid #c8d8f0;
    border-radius: 8px;
    padding: 14px 18px; margin-bottom: 18px;
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 8px;
}

.dist-label {
    font-size: 0.65rem; font-weight: 600; color: #6b8aaa;
    text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px;
}

.dist-value {
    font-size: 1.8rem; font-weight: 800;
    color: #1a56db; line-height: 1;
}

.dist-unit { font-size: 0.9rem; font-weight: 600; color: #6b8aaa; margin-left: 3px; }
.dist-km   { font-size: 0.78rem; font-weight: 500; color: #a0b4cc; }

/* ===== STEPPER ===== */
.stepper { position: relative; }

.step-item {
    display: flex; gap: 14px;
    padding-bottom: 20px;
}

.step-item:last-child { padding-bottom: 0; }

.step-line-wrap {
    display: flex; flex-direction: column;
    align-items: center; flex-shrink: 0; width: 28px;
}

.step-circle {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 800;
    flex-shrink: 0; position: relative; z-index: 1;
}

.step-circle.start  { background: #f0fdf4; border: 2px solid #16a34a; color: #16a34a; }
.step-circle.tps    { background: #fef2f2; border: 2px solid #dc2626; color: #dc2626; }
.step-circle.finish { background: #fffbeb; border: 2px solid #d97706; color: #d97706; }

.step-connector {
    flex: 1; width: 1px;
    background: #d0dce8;
    margin: 3px 0; min-height: 18px;
}

.step-content { flex: 1; padding-top: 3px; }

.step-title { font-size: 0.85rem; font-weight: 700; color: #1e3a5f; line-height: 1.3; }
.step-desc  { font-size: 0.70rem; color: #6b8aaa; margin-top: 3px; }

.step-tag {
    display: inline-block; margin-top: 5px;
    font-size: 0.58rem; font-weight: 700; padding: 2px 7px;
    border-radius: 4px; letter-spacing: 0.3px; text-transform: uppercase;
}

.tag-start  { background: #f0fdf4; color: #16a34a;  border: 1px solid #bbf7d0; }
.tag-tps    { background: #fef2f2; color: #dc2626;  border: 1px solid #fecaca; }
.tag-finish { background: #fffbeb; color: #d97706;  border: 1px solid #fde68a; }

/* ===== READY STATE ===== */
.ready-state { text-align: center; padding: 36px 16px; }

.ready-icon {
    width: 60px; height: 60px; border-radius: 14px;
    margin: 0 auto 14px;
    background: #eff4ff;
    border: 1px solid #c8d8f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}

.ready-title { font-size: 0.95rem; font-weight: 700; color: #1e3a5f; margin-bottom: 5px; }
.ready-sub   { font-size: 0.74rem; color: #6b8aaa; line-height: 1.5; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body { padding: 10px 10px 28px; }

    .dash-header {
        flex-direction: column; gap: 10px;
        padding: 12px 14px;
    }

    .dash-nav { width: 100%; }
    .glass-card-inner { padding: 14px; }
    #map { height: 300px; }
    .distance-banner { flex-direction: column; align-items: flex-start; }
}
