* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1f2328;
  line-height: 1.45;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e1e4e8;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.topbar h1 { margin: 0; font-size: 1.05rem; }
.topbar nav { display: flex; gap: .5rem; }

main { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }

.view { animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.card {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.card h2 { margin-top: 0; }

label {
  display: block;
  font-size: .85rem;
  color: #333;
  margin-bottom: .8rem;
}
label > span { display: block; }
input, select, textarea {
  display: block;
  width: 100%;
  padding: .55rem .55rem;
  border: 1px solid #c8ccd1;
  border-radius: 5px;
  font-size: .95rem;
  background: #fff;
  font-family: inherit;
  margin-top: .25rem;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid #0b5fff33;
  border-color: #0b5fff;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .25rem 1rem;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 5px;
  padding: .55rem 1rem;
  font-size: .95rem;
  font-family: inherit;
}
button.primary { background: #0b5fff; color: #fff; }
button.primary:hover { background: #094bd1; }
button.secondary { background: #e8eaed; color: #222; }
button.secondary:hover { background: #dadde1; }
button.danger { background: #e0443e; color: #fff; }
button.danger:hover { background: #c0362f; }
button.big { padding: .75rem 1.25rem; font-size: 1rem; }
button.block { display: block; width: 100%; }
button.link {
  background: transparent;
  color: #0b5fff;
  padding: .25rem .5rem;
  font-size: .9rem;
}
button.link:hover { text-decoration: underline; }

h3 { margin: 1.5rem 0 .5rem; font-size: .9rem; color: #555; text-transform: uppercase; letter-spacing: .04em; }

.bottom { display: flex; justify-content: flex-end; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.detail-actions { justify-content: flex-end; }

.error { color: #a21c18; background: #fff1f0; border: 1px solid #e0443e; border-radius: 5px; padding: .5rem .75rem; }
.ok { color: #1a7f37; }

.hint { color: #555; font-size: .85rem; }
.empty { color: #888; text-align: center; padding: 2rem 1rem; }

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.dashboard-header h2 { margin: 0; }
.dashboard-actions { display: flex; gap: .5rem; align-items: center; }

.bookings-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .75rem;
}
.booking-card {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: .9rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.booking-card:hover { border-color: #0b5fff; box-shadow: 0 2px 8px rgba(11,95,255,.1); }
.booking-card .ref { font-weight: 600; }
.booking-card .dates { color: #555; font-size: .85rem; margin-top: .25rem; }
.booking-card .meta { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; flex-wrap: wrap; }

.status-badge {
  display: inline-block;
  font-size: .75rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: #eef0f4;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.status-badge.pending { background: #fff8c5; color: #6b5d00; }
.status-badge.completed { background: #dcfbe1; color: #0d6e2b; }
.status-badge.submitted { background: #d2e2ff; color: #053e9e; }
.status-badge.archived { background: #eef0f4; color: #555; }

.travelers-count { font-size: .8rem; color: #555; }

.back-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.back-row h2 { margin: 0; font-size: 1.1rem; flex: 1 1 auto; }

.detail-meta { font-size: .9rem; margin-bottom: 1rem; }

.checkin-link-box { margin: 1rem 0 1.5rem; padding: 1rem; background: #f6f8fa; border-radius: 6px; border: 1px solid #e1e4e8; }
.copy-row { display: flex; gap: .5rem; align-items: stretch; margin-top: .25rem; }
.copy-row input { flex: 1 1 auto; font-family: ui-monospace, monospace; font-size: .8rem; }

.travelers-list { display: flex; flex-direction: column; gap: .5rem; }
.traveler-row {
  background: #fafbfc;
  border: 1px solid #e1e4e8;
  border-radius: 5px;
  padding: .6rem .8rem;
  font-size: .9rem;
}
.traveler-row .name { font-weight: 500; }
.traveler-row .details { color: #555; font-size: .82rem; margin-top: .15rem; }
