﻿:root {
  color-scheme: light;
  --ink: #0c0f1a;
  --muted: #49506a;
  --sky: #e7f1ff;
  --mist: #f7f9fc;
  --accent: #2f66ff;
  --accent-dark: #1f4ed8;
  --sea: #0f6b73;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(12, 15, 26, 0.12);
  --radius: 18px;
  font-family: "Space Grotesk", "Futura", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #f3f7ff 0%, #eef2fb 45%, #e6ecf6 100%);
  color: var(--ink);
}

h1, h2, h3 {
  margin: 0;
}

p {
  margin: 0;
}

main {
  max-width: 1080px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 32px 16px;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f66ff, #4cc3ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 12px 24px rgba(47, 102, 255, 0.35);
}

.site-header p {
  color: var(--muted);
  margin-top: 4px;
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.hidden {
  display: none !important;
}

select {
  border-radius: 12px;
  border: 1px solid rgba(94, 97, 120, 0.2);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
}

button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(47, 102, 255, 0.25);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(47, 102, 255, 0.32);
}

button.ghost {
  background: transparent;
  color: var(--sea);
  border: 1px solid rgba(14, 77, 89, 0.25);
  box-shadow: none;
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px 0 32px;
  box-shadow: var(--shadow);
  animation: rise 0.4s ease;
}

.tabs {
  display: inline-flex;
  gap: 8px;
  background: rgba(14, 77, 89, 0.08);
  padding: 6px;
  border-radius: 999px;
  margin: 8px 0 24px;
}

.tab {
  background: transparent;
  color: var(--sea);
  border: 1px solid transparent;
  box-shadow: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
}

.tab.active {
  background: #fff;
  border-color: rgba(14, 77, 89, 0.2);
  box-shadow: 0 10px 20px rgba(14, 77, 89, 0.12);
}

.tab-panel.hidden {
  display: none;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

input, textarea {
  border-radius: 12px;
  border: 1px solid rgba(94, 97, 120, 0.2);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.95rem;
}

textarea {
  resize: vertical;
}

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

.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.toolbar label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toolbar input {
  margin-top: 6px;
  min-width: 220px;
}

.counts {
  font-weight: 600;
  color: var(--sea);
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.category-filter select {
  text-transform: none;
}

.trip-list {
  display: grid;
  gap: 20px;
}

.trip-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.trip-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(47, 102, 255, 0.2);
  pointer-events: none;
}

.trip-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trip-meta h3 {
  margin: 0;
  font-size: 1.2rem;
}

.trip-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.tag {
  background: rgba(15, 107, 115, 0.12);
  color: var(--sea);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.category-tag {
  background: rgba(47, 102, 255, 0.16);
  color: var(--accent-dark);
}

.people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.people-picker p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.people-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(94, 97, 120, 0.2);
  background: #fff;
}

.people-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 107, 115, 0.08);
  font-size: 0.9rem;
}

.people-option input {
  margin: 0;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.trip-actions {
  display: flex;
  gap: 10px;
}

.trip-actions button {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 15, 26, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 50;
}

.modal-card {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 20px 22px 24px;
  box-shadow: var(--shadow);
  animation: rise 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-form {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}

.availability-results {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.availability-card {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(15, 107, 115, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.availability-card.unavailable {
  background: rgba(242, 122, 75, 0.12);
}

.availability-card strong {
  font-size: 0.98rem;
}

.availability-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-only {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(94, 97, 120, 0.2);
}

.users-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.user-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 0.6fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(14, 77, 89, 0.05);
}

.user-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

.user-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.user-actions button {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.user-row .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 102, 255, 0.12);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.8rem;
}

.user-row .pill.active {
  background: rgba(14, 77, 89, 0.12);
  color: var(--sea);
}

.site-footer {
  text-align: center;
  padding: 32px 16px 48px;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .span-2 {
    grid-column: span 1;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .user-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .user-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

