:root {
  --bg: #0e1114;
  --fg: #e9f1f6;
  --muted: #9fb3c8;
  --accent: #50b394;
  --soft: #1a2128;
  --card: #12171c;
  --danger: #e25b5b;
  --ok: #58c495;
  --warn: #e2b35b;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, Arial, sans-serif;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.4px;
}
.brand img {
  max-width: 6rem;
  display: block;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  margin-top: 0.5rem;
}
.row {
  display: grid;
  gap: 12px;
}
.grid-2 {
  grid-template-columns: 1fr 1fr;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 740px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

button,
.btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #07261c;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 14px rgba(80, 179, 148, 0.3);
}
button:hover {
  transform: translateY(-1px);
}
button.secondary {
  background: var(--soft);
  color: var(--fg);
  box-shadow: none;
}
button.danger {
  background: var(--danger);
  color: white;
}
button.warn {
  background: var(--warn);
  color: #231a07;
}

/* Utility class for extra button spacing */
.spaced-button {
  margin: 8px;
  padding: 12px 16px;
}
/* Make the Sign up button grey */
.btn.secondary {
  background: var(--warn);
  color: #0b0f13; /* dark text for contrast */
  box-shadow: none;
}

/* Optional: make anchor-buttons behave like buttons */
a.btn {
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
}
button:hover,
.btn:hover {
  transform: translateY(-1px);
}
input,
select,
textarea {
  width: 100%;
  background: #0b0f13;
  color: var(--fg);
  border: 1px solid #202a33;
  border-radius: 12px;
  padding: 10px 12px;
}
label {
  font-size: 0.9rem;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 6px;
}
.help {
  color: var(--muted);
  font-size: 0.9rem;
}

hr.sep {
  border: none;
  border-top: 1px solid #1f2a33;
  margin: 16px 0;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--fg);
  font-size: 0.85rem;
}

.day {
  margin-bottom: 12px;
}
.day > .title {
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.activity {
  display: grid;
  gap: 6px;
  background: #0c1217;
  border: 1px solid #1b2732;
  border-radius: 16px;
  padding: 12px;
}
.activity .line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.activity .title {
  font-weight: 700;
}
.activity .meta {
  color: var(--muted);
  font-size: 0.9rem;
}
.activity .att {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.badge {
  background: #0d161c;
  border: 1px solid #20303e;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
}
.modal-backdrop.show {
  display: flex;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.person img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
}
.person .name {
  font-weight: 600;
}

footer {
  margin: 48px 0 12px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

/* Calendar UI */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.month-grid .cell {
  background: #0b1015;
  border: 1px solid #1b2732;
  border-radius: 12px;
  padding: 8px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.month-grid .dim {
  opacity: 0.4;
}
.cell .daynum {
  font-size: 0.85rem;
  color: var(--muted);
}
.cell .item {
  font-size: 0.85rem;
  background: #0e151b;
  border: 1px solid #243441;
  border-radius: 8px;
  padding: 3px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trip-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.trip-col {
  flex: 0 0 200px;
  background: #0b1015;
  border: 1px solid #1b2732;
  border-radius: 12px;
  padding: 8px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trip-title {
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Dashboard helpers */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#dashboard .card h2 {
  margin-top: 0;
}

/* Modal backdrop helpers (already present, ensure click-outside dims only) */
.modal-backdrop {
  z-index: 50;
}
