* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
}
.container { max-width: 720px; margin: 0 auto; padding: 20px; }
.container.narrow { max-width: 420px; }

h1 { font-size: 1.5rem; margin-bottom: 4px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
.subtitle { color: #6b7280; margin-top: 0; }
.muted { color: #6b7280; font-size: 0.85rem; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

label { display: block; font-size: 0.85rem; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=file], select, textarea {
  width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 1rem; background: #fff;
}
textarea { resize: vertical; }

.or-divider { text-align: center; color: #9ca3af; margin: 10px 0; font-size: 0.85rem; }

.btn {
  display: inline-block; padding: 10px 16px; border-radius: 8px; border: none;
  font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
}
.btn-block { display: block; width: 100%; margin-top: 16px; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.btn-danger { background: #dc2626; color: #fff; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert-error { background: #fee2e2; color: #991b1b; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }

/* Tracking page */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: sticky; top: 0; z-index: 1000;
}
.topbar-actions { display: flex; gap: 8px; }
#map { width: 100%; height: 60vh; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; margin-left: 8px; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-finished { background: #e5e7eb; color: #374151; }

.gps-info { padding: 8px 16px; font-size: 0.8rem; color: #6b7280; background: #fff; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center; z-index: 2000;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: #fff; width: 100%; max-width: 480px; border-radius: 16px 16px 0 0;
  padding: 20px; max-height: 85vh; overflow-y: auto;
}
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* Riwayat */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.trip-card { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; }
.trip-meta { text-align: right; }
.stop-card img.stop-photo { max-width: 100%; border-radius: 8px; margin-top: 8px; }
.notes { margin-top: 6px; font-size: 0.9rem; }
