/* Visit Track Custom Styling - Ultra Responsive & Mobile First */
:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
}

* {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--light-bg);
    color: #334155;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-link.active {
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    font-weight: 600;
}

/* Timer Badge & Widgets */
.timer-badge {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-weight: bold;
    background: #0f172a;
    color: #38bdf8;
    padding: 8px 18px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
}

.timer-badge-sm {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    font-weight: bold;
    background: #0f172a;
    color: #38bdf8;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

/* Map Containers */
#map, #depoMap, #liveMap {
    width: 100%;
    height: 380px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    z-index: 1;
}

/* Camera Component */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background-color: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.camera-container video, .camera-container canvas, .camera-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
}

.camera-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Activity Log Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 2px;
    background: #cbd5e1;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -17px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-content {
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* Status Badges */
.badge-active {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-weight: 600;
}

.badge-completed {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-weight: 600;
}

.radius-indicator {
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.radius-in {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.radius-out {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

/* Utility */
.cursor-pointer {
    cursor: pointer;
}

/* 📱 MOBILE BOTTOM DOCK NAVIGATION (Khusus HP / Tablet < 992px) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 4px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 6px;
    border-radius: 10px;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.mobile-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.mobile-nav-item:hover, .mobile-nav-item:focus {
    color: #38bdf8;
}

.mobile-nav-item.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

/* ⚡ MOBILE RESPONSIVE MEDIA QUERIES */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 80px !important; /* Mencegah konten tertutup dock bawah HP */
    }

    #map, #depoMap, #liveMap {
        height: 300px; /* Tinggi map disesuaikan untuk layar HP */
    }

    .container, .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Form Controls & Buttons di HP */
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .form-control-lg, .form-select-lg {
        font-size: 0.95rem;
        padding: 0.65rem 0.85rem;
    }

    .timer-badge {
        font-size: 1.25rem;
        padding: 6px 14px;
    }

    /* Table Responsiveness di HP */
    .table-responsive {
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .h3, h3 {
        font-size: 1.35rem;
    }

    .h4, h4 {
        font-size: 1.15rem;
    }

    .card-body {
        padding: 1rem !important;
    }
}
