* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f0fdf4;
  color: #1f2937;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

h1,
h2 {
  margin-top: 0;
  color: #065f46;
}

.topbar {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: #10b981;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6b7280;
}

.btn-secondary:hover {
  background: #4b5563;
}

/* --- Activity form actions (Edit / Cancel area) --- */
#activity-form-actions {
  margin-top: 8px;
  margin-bottom: 12px;
}

.btn span {
  margin-right: 6px;
}

.trip-nav {
  display: flex;
  gap: 12px;
  margin: 12px 0 24px;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: #fff;
}

input:focus,
select:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: #10b981;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

button:hover {
  background: #059669;
  transform: translateY(-1px);
}

.card {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.empty-state {
  background: #fff;
  border: 1px dashed #a7f3d0;
  border-radius: 12px;
  padding: 16px;
  color: #666;
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 8px;
}

.tag.plane {
  background: #dbeafe;
  color: #1d4ed8;
}

.tag.car {
  background: #dcfce7;
  color: #166534;
}

.tag.hike {
  background: #fef3c7;
  color: #92400e;
}

.tag.city {
  background: #f3e8ff;
  color: #7e22ce;
}

.tag.accommodation {
  background: #fee2e2;
  color: #b91c1c;
}

.tag.other {
  background: #e5e7eb;
  color: #374151;
}

.location-line {
  font-weight: 600;
  color: #065f46;
  margin-bottom: 4px;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 0 0 20px 10px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  bottom: -4px;
  width: 2px;
  background: #a7f3d0;
}

.timeline-item:last-child::before {
  display: none;
}

.circle {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.timeline-content {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  padding: 12px;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #d1fae5;
  text-align: left;
}

tfoot td,
.total-row td {
  font-weight: 700;
}

@media (max-width: 640px) {
  .page {
    padding: 16px 12px 36px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .trip-nav {
    flex-direction: column;
  }

  .btn,
  button {
    width: 100%;
    text-align: center;
  }
}
