/* ========================================
   Global Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --secondary-color: #7B8D9E;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #2C3E50;
    --light-bg: #F8F9FA;
    --white: #FFFFFF;
    --gray: #6C757D;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-bg);
}

/* ========================================
   Navbar
   ======================================== */

.navbar {
    background: linear-gradient(135deg, var(--primary-color), #357ABD);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-user {
    color: var(--white);
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #357ABD;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #6A7A8A;
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-info {
    background-color: #17a2b8;
    color: var(--white);
}

.btn-info:hover {
    background-color: #138496;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-detail {
    background-color: var(--primary-color);
    color: var(--white);
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.btn-detail:hover {
    background-color: #357ABD;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-route {
    background: linear-gradient(135deg, #FF6B6B, #FF8787);
    color: var(--white);
    width: 100%;
    margin-top: 0.5rem;
    font-weight: 500;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-route:hover {
    background: linear-gradient(135deg, #FF5252, #FF6B6B);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-route i {
    font-size: 1.1rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* ========================================
   Main Layout (Index Page)
   ======================================== */

.main-wrapper {
    display: flex;
    height: calc(100vh - 72px);
}

.sidebar {
    width: 400px;
    background-color: var(--white);
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #357ABD);
    color: var(--white);
}

.sidebar-header h2 {
    margin-bottom: 1rem;
}

/* Filter Panel */
.filter-panel {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.filter-section {
    margin-bottom: 1rem;
}

.filter-label {
    display: block;
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.filter-label i {
    margin-right: 0.3rem;
}

.filter-input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-input:focus {
    outline: none;
    border-color: var(--white);
    background-color: var(--white);
}

.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range-inputs span {
    color: var(--white);
    font-weight: bold;
}

.filter-input-small {
    flex: 1;
    max-width: 100px; /* Batasi lebar maksimal */
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-input-small:focus {
    outline: none;
    border-color: var(--white);
    background-color: var(--white);
}

.filter-select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--white);
    background-color: var(--white);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-buttons .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.location-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.location-buttons .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.location-buttons #findNearbyBtn {
    flex: 1;
}

.location-buttons #refreshLocationBtn {
    width: 45px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-buttons #refreshLocationBtn i {
    margin: 0;
}

.location-buttons #refreshLocationBtn:hover i {
    animation: spin 0.6s ease;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.lapangan-list {
    padding: 1rem;
}

.lapangan-card {
    background-color: var(--white);
    border: 1px solid #E0E0E0;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.lapangan-card:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-2px);
}

.lapangan-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.lapangan-card .address,
.lapangan-card .price {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.lapangan-card .price {
    color: var(--success-color);
    font-weight: bold;
}

.lapangan-card .rating {
    color: var(--warning-color);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.distance-info {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.btn-detail {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Route Arrow Animation */
.route-arrow {
    background: transparent;
    border: none;
    animation: pulse 1.5s infinite;
}

.leaflet-popup-content-wrapper {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.leaflet-popup-content {
    margin: 1rem;
    font-size: 0.95rem;
}

.no-data {
    text-align: center;
    color: var(--gray);
    padding: 2rem;
}

/* ========================================
   Route Panel (Instruksi Rute)
   ======================================== */

.route-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 380px;
    max-height: calc(100vh - 100px);
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 1000;
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 2px solid var(--light-bg);
    background: linear-gradient(135deg, var(--primary-color), #357ABD);
    color: var(--white);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.route-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

.btn-close-route {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.2rem 0.5rem;
}

.btn-close-route:hover {
    color: var(--danger-color);
    transform: scale(1.1);
}

.route-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--light-bg);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
}

.summary-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.summary-item div {
    display: flex;
    flex-direction: column;
}

.summary-item strong {
    font-size: 0.95rem;
    color: var(--dark-color);
}

.summary-item small {
    font-size: 0.75rem;
    color: var(--gray);
}

.transport-modes {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--light-bg);
}

.btn-transport {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.8rem 0.5rem;
    background-color: var(--light-bg);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-transport:hover {
    background-color: #E8F4FD;
    border-color: var(--primary-color);
}

.btn-transport.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-transport i {
    font-size: 1.3rem;
}

.route-note {
    padding: 0.8rem 1rem;
    margin: 0 1rem 1rem 1rem;
    background-color: #FFF3CD;
    border-left: 4px solid #FFC107;
    border-radius: 5px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.route-note i {
    color: #FF6B00;
    margin-top: 0.2rem;
    font-size: 1rem;
}

.route-note small {
    color: #856404;
    line-height: 1.5;
    font-size: 0.85rem;
}

.route-steps {
    padding: 1rem;
}

.route-steps h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.route-step {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.route-step:hover {
    background-color: #E8F4FD;
}

.route-step.destination {
    background-color: #D4EDDA;
    border-left: 4px solid var(--success-color);
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: var(--white);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
}

.route-step.destination .step-icon {
    color: var(--success-color);
}

.step-content {
    flex: 1;
}

.step-instruction {
    font-size: 0.95rem;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.step-distance {
    font-size: 0.8rem;
    color: var(--gray);
}

.loading {
    padding: 2rem;
    text-align: center;
    color: var(--primary-color);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ========================================
   Auth Pages (Login & Register)
   ======================================== */

.auth-page {
    background: linear-gradient(135deg, var(--primary-color), #357ABD);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.auth-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.auth-form input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #DDD;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
    padding: 0.8rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.alert-info i {
    color: #17a2b8;
    font-size: 1.1rem;
}

/* ========================================
   Detail Page
   ======================================== */

.detail-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.detail-content {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.detail-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.rating-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    color: var(--warning-color);
    margin-bottom: 1.5rem;
}

.rating-value {
    font-weight: bold;
    color: var(--dark-color);
}

.rating-count {
    color: var(--gray);
    font-size: 1rem;
}

.detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #E0E0E0;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.2rem;
}

.info-item strong {
    display: block;
    margin-bottom: 0.3rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.detail-section i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* User Photo Gallery */
.user-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.user-photo-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.user-photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.user-photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.user-photo-item .photo-caption {
    padding: 0.8rem;
    font-size: 0.9rem;
    color: var(--dark-color);
    margin: 0;
    background-color: var(--white);
}

/* Lightbox Modal */
.lightbox-modal {
    display: block;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--white);
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--danger-color);
}

/* Rating Form */
.rating-form {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 2.5rem;
    color: #ddd;
    transition: color 0.3s ease, transform 0.2s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.star-rating label:hover {
    transform: scale(1.15);
}

.star-rating label.active {
    color: #ffc107 !important;
}

.rating-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #DDD;
    border-radius: var(--border-radius);
    font-family: inherit;
    margin-bottom: 1rem;
}

.login-prompt {
    text-align: center;
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

/* Reviews List */
.reviews-list {
    margin-top: 1.5rem;
}

.review-item {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.review-rating {
    color: var(--warning-color);
    margin-top: 0.3rem;
}

.review-rating .active {
    color: var(--warning-color);
}

.review-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.review-text {
    color: var(--dark-color);
    line-height: 1.6;
}

.no-reviews {
    text-align: center;
    color: var(--gray);
    padding: 2rem;
}

/* ========================================
   Admin Dashboard
   ======================================== */

.admin-container {
    display: flex;
    min-height: calc(100vh - 72px);
}

.admin-sidebar {
    width: 250px;
    background-color: var(--white);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.admin-menu {
    list-style: none;
    padding: 1rem 0;
}

.admin-menu li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.admin-menu li a:hover,
.admin-menu li a.active {
    background-color: var(--light-bg);
    border-left: 4px solid var(--primary-color);
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.admin-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.8rem;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background-color: var(--light-bg);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #E0E0E0;
}

.admin-table th {
    font-weight: 600;
    color: var(--dark-color);
}

.admin-table tbody tr:hover {
    background-color: var(--light-bg);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.text-center {
    text-align: center;
}

.text-warning {
    color: var(--warning-color);
}

.text-muted {
    color: #CCC;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 2% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #E0E0E0;
}

.modal-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.close:hover {
    color: var(--dark-color);
}

.modal form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #DDD;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E0E0E0;
}

/* ========================================
   Analytics Dashboard Styles
   ======================================== */

.analytics-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #357ABD);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.stat-primary {
    background: linear-gradient(135deg, #4A90E2, #357ABD);
}

.stat-success {
    background: linear-gradient(135deg, #28a745, #218838);
}

.stat-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.stat-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.stat-content h3 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: bold;
}

.stat-content p {
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
    opacity: 0.9;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.chart-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}

.chart-wide {
    grid-column: span 2;
}

.chart-header {
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.chart-header h3 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.chart-subtitle {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {

/* ========================================
   Photo Manager Styles
   ======================================== */

.modal-large {
    max-width: 1000px;
}

.photo-manager {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.photo-upload-section,
.photo-gallery-section {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.photo-upload-section h4,
.photo-gallery-section h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.photo-upload-section h4 i,
.photo-gallery-section h4 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.85rem;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: var(--white);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.photo-primary-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--success-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.photo-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem 0.5rem 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.photo-item:hover .photo-actions {
    opacity: 1;
}

.photo-actions button {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-set-primary {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-set-primary:hover {
    background-color: #218838;
}

.btn-delete-photo {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-delete-photo:hover {
    background-color: #c82333;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-wrapper {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 120px);
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 50vh;
        order: 1;
    }

    .map-container {
        width: 100%;
        height: 50vh;
        min-height: 400px;
        order: 2;
        position: relative;
    }

    #map {
        width: 100%;
        height: 100%;
        min-height: 400px;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .detail-info {
        grid-template-columns: 1fr;
    }

    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .route-panel {
        width: 100%;
        max-width: 100%;
        top: 0;
        right: 0;
        max-height: 60vh;
        border-radius: 0;
    }

    .transport-modes {
        flex-direction: column;
    }

    .route-summary {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-wide {
        grid-column: span 1;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-icon {
        font-size: 2.5rem;
    }

    .stat-content h3 {
        font-size: 2rem;
    }
}

/* ========================================
   Map Picker Modal Styles
   ======================================== */

.map-picker-container {
    padding: 1rem;
}

.map-search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.map-search-box input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.map-search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
}

.search-result-item {
    padding: 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--light-bg);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item strong {
    display: block;
    color: var(--dark-color);
    margin-bottom: 0.2rem;
}

.search-result-item small {
    color: var(--gray);
}

#pickerMap {
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 2px solid #ddd;
}

.location-info {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.location-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.location-info p {
    margin: 0.3rem 0;
    color: var(--dark-color);
}

.location-info strong {
    color: var(--gray);
    font-weight: 600;
}

.btn-block {
    width: 100%;
    display: block;
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
}

/* ========================================
   Additional Mobile Fixes
   ======================================== */

@media (max-width: 480px) {
    .sidebar {
        max-height: 40vh;
    }

    .map-container {
        height: 60vh;
        min-height: 350px;
    }

    #map {
        min-height: 350px;
    }

    .filter-panel {
        padding: 0.8rem;
    }

    .filter-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .location-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .lapangan-card {
        padding: 1rem;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .main-wrapper {
        flex-direction: row;
        height: 100vh;
    }

    .sidebar {
        width: 40%;
        max-height: 100%;
        order: 0;
    }

    .map-container {
        width: 60%;
        height: 100%;
        order: 0;
    }
}
}