:root {
  --ink: #0c0f0c;
  --paper: #f3f5ef;
  --muted: rgba(243, 245, 239, 0.58);
  --lime: #c8f542;
  --lime-deep: #9bc422;
  --line: rgba(243, 245, 239, 0.14);
  --danger: #ff7a6a;
  --warn: #ffd166;
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--paper);
  font-family: var(--font-body);
  background: var(--ink);
  overflow-x: clip;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 8% 0%, rgba(200, 245, 66, 0.18), transparent 55%),
    linear-gradient(165deg, #080a08, #121612 50%, #0a0d0a);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--paper);
  text-decoration: none;
}

.top-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

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

.ghost {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.ghost:hover { color: var(--paper); }

main {
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem;
  max-width: 52rem;
}

.panel h1,
.dash-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.lead {
  margin: 0.6rem 0 1.4rem;
  color: var(--muted);
}

.login {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 22rem;
}

.login label {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.login input {
  border: 1px solid var(--line);
  background: rgba(243, 245, 239, 0.04);
  color: var(--paper);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-size: 16px;
  min-height: 48px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.btn {
  margin-top: 0.8rem;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  background: linear-gradient(160deg, var(--lime), var(--lime-deep));
  color: var(--ink);
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  min-height: 48px;
  width: 100%;
}

.btn:disabled { opacity: 0.5; cursor: wait; }

.status {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.92rem;
}

.status.error { color: var(--danger); }

.dash-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
}

.filter.active {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
  font-weight: 600;
}

.filter span {
  opacity: 0.75;
  margin-left: 0.25rem;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.row {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  background: rgba(12, 15, 12, 0.55);
  display: grid;
  gap: 0.65rem;
}

.row-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  align-items: baseline;
}

.when {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.badge {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.badge.pending { color: var(--warn); border-color: rgba(255, 209, 102, 0.45); }
.badge.confirmed { color: var(--lime); border-color: rgba(200, 245, 66, 0.45); }
.badge.cancelled { color: var(--danger); border-color: rgba(255, 122, 106, 0.45); }

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  display: grid;
  gap: 0.2rem;
}

.meta a { color: var(--paper); }

.note {
  margin: 0;
  padding: 0.65rem 0.8rem;
  background: rgba(243, 245, 239, 0.04);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.actions button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  min-height: 44px;
  flex: 1 1 auto;
}

.actions .confirm {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
  font-weight: 600;
}

.actions .cancel:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.empty {
  color: var(--muted);
  padding: 1.5rem 0;
  font-style: italic;
}

@media (max-width: 600px) {
  .top {
    padding:
      max(0.85rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      0.85rem
      max(1rem, env(safe-area-inset-left));
  }

  main {
    padding:
      1.4rem
      max(1rem, env(safe-area-inset-right))
      max(2rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
  }

  .login { max-width: none; }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .filters .filter:last-child {
    grid-column: 1 / -1;
  }

  .row-top { flex-direction: column; }

  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }

  .who {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
