/* ── Brand tokens ────────────────────────────────────────────────────────── */

:root {
  --cream:  #FAF3E1;
  --sand:   #F5E7C6;
  --orange: #FF6D1F;
  --dark:   #222222;
}

/* ── Fonts ───────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Recoleta';
  src: url('/fonts/Recoleta-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Recoleta';
  src: url('/fonts/Recoleta-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Recoleta';
  src: url('/fonts/Recoleta-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Recoleta';
  src: url('/fonts/Recoleta-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */

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

html, body {
  height: 100%;
}

body {
  font-family: 'Recoleta', Georgia, serif;
  background: var(--cream);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
}

/* ── Shared page header ──────────────────────────────────────────────────── */

.page-header {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 100;
}

.logo {
  display: block;
  height: 40px;
  width: auto;
}

/* ── Access gate ─────────────────────────────────────────────────────────── */

.gate-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.gate-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
}

.gate-form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gate-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--dark);
  opacity: 0.55;
  letter-spacing: 0.02em;
}

.gate-input {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--dark);
  background: var(--sand);
  border: 1.5px solid transparent;
  border-radius: 6px;
  padding: 14px 18px;
  width: 100%;
  outline: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.15s;
}

.gate-input::placeholder {
  text-transform: none;
  letter-spacing: 0;
  color: var(--dark);
  opacity: 0.35;
}

.gate-input:focus {
  border-color: var(--orange);
}

.gate-button {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
  background: var(--orange);
  border: none;
  border-radius: 6px;
  padding: 14px 18px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.gate-button:hover {
  opacity: 0.88;
}

.gate-error {
  font-size: 13px;
  font-weight: 400;
  color: var(--orange);
}

/* ── Admin page ──────────────────────────────────────────────────────────── */

.admin-body {
  min-height: 100vh;
  padding: 100px 48px 80px;
}

.admin-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 48px;
}

.admin-empty {
  font-size: 15px;
  color: var(--dark);
  opacity: 0.45;
}

/* Table */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  opacity: 0.45;
  padding: 0 16px 14px 0;
  border-bottom: 1.5px solid var(--sand);
}

.admin-table td {
  padding: 18px 16px 18px 0;
  border-bottom: 1px solid var(--sand);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-lead-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--dark);
}

.admin-date {
  color: var(--dark);
  opacity: 0.55;
  font-size: 13px;
  white-space: nowrap;
}

.admin-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--dark);
  background: var(--sand);
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-block;
}

.admin-code-copy {
  font-family: inherit;
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark);
  opacity: 0.4;
  padding: 4px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
  transition: opacity 0.15s;
}

.admin-code-copy:hover {
  opacity: 1;
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-btn {
  font-family: 'Recoleta', Georgia, serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
  display: inline-block;
  border: none;
}

.admin-btn:hover {
  opacity: 0.8;
}

.admin-btn--copy {
  background: var(--sand);
  color: var(--dark);
}

.admin-btn--view {
  background: var(--orange);
  color: var(--dark);
}

.admin-btn--copied {
  background: var(--sand);
  color: var(--dark);
  opacity: 0.6;
}

/* Logout link */

.admin-logout {
  display: inline-block;
  margin-top: 48px;
  font-size: 13px;
  color: var(--dark);
  opacity: 0.4;
  text-decoration: none;
}

.admin-logout:hover {
  opacity: 0.7;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .admin-body {
    padding: 100px 20px 60px;
  }

  .admin-table th:nth-child(2),
  .admin-table td:nth-child(2) {
    display: none;
  }

  .admin-table th,
  .admin-table td {
    padding-right: 8px;
  }

  .admin-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
