:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #62706b;
  --line: #d8e0dc;
  --paper: #f7f4ed;
  --panel: rgba(255, 252, 245, 0.88);
  --panel-solid: #fffaf1;
  --sage: #49695f;
  --sage-dark: #223f38;
  --reed: #c9a66b;
  --water: #dce9ea;
  --danger: #9c352c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
}

button,
input {
  font: inherit;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.25rem;
  background:
    linear-gradient(90deg, rgba(19, 32, 28, 0.38), rgba(255, 250, 241, 0.18) 45%, rgba(19, 32, 28, 0.25)),
    url("/static/holiday-homes-login.png") center / cover no-repeat;
}

.gate-shell {
  width: min(100%, 34rem);
}

.gate-panel {
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.35rem;
  background: var(--panel);
  box-shadow: 0 1.5rem 4rem rgba(18, 33, 29, 0.24);
  backdrop-filter: blur(18px);
}

.gate-panel h1,
.topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.gate-form {
  margin-top: 2rem;
}

.gate-form input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.code-lens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  cursor: text;
}

.code-lens span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid rgba(73, 105, 95, 0.28);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.58);
  color: var(--sage-dark);
  font-size: clamp(2.2rem, 12vw, 4.4rem);
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 -0.35rem 1rem rgba(73, 105, 95, 0.08);
}

.code-lens span.filled {
  border-color: rgba(34, 63, 56, 0.52);
  background: rgba(255, 250, 241, 0.9);
}

.gate-form button,
.logout-button {
  border: 0;
  color: #fffaf1;
  background: var(--sage-dark);
  cursor: pointer;
}

.gate-form button {
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 0.85rem;
  font-weight: 850;
  box-shadow: 0 0.85rem 1.8rem rgba(34, 63, 56, 0.24);
}

.login-error {
  margin: 0.9rem 0 0;
  color: var(--danger);
  font-weight: 750;
}

.directory-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(220, 233, 234, 0.95), rgba(247, 244, 237, 1) 18rem),
    var(--paper);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 3rem);
}

.topbar h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.logout-button {
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-weight: 800;
}

.table-shell {
  padding: 0 clamp(1rem, 4vw, 3rem) 3rem;
}

.directory-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel-solid);
  box-shadow: 0 1rem 2.5rem rgba(41, 61, 56, 0.12);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 44rem;
}

th,
td {
  padding: 0.88rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #fffaf1;
  background: var(--sage-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tr:nth-child(even) td {
  background: rgba(220, 233, 234, 0.38);
}

tr:hover td {
  background: rgba(201, 166, 107, 0.18);
}

.house-pill {
  display: inline-grid;
  min-width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 999px;
  color: var(--sage-dark);
  background: var(--water);
  font-weight: 900;
}

.name-cell {
  font-weight: 820;
}

a {
  color: #234c61;
  font-weight: 720;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
  }

  .directory-card {
    border-radius: 0.85rem;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
  }

  td {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 0;
    background: transparent !important;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }
}
