/* PKO @ 50 : admin. Ivory and antique gold, Cinzel + Lato. */

:root {
  --paper:     #f6f1e7;
  --paper-2:   #fffdf8;
  --paper-3:   #f1ead9;
  --line:      #e2d9c5;
  --line-soft: #ece5d5;
  --gold:      #8f6f22;
  --gold-hi:   #b8933f;
  --gold-lo:   #6f5416;
  --ink:       #2f2718;
  --ink-soft:  #6b6150;
  --muted:     #8a7d63;
  --yes:       #3f7d55;
  --no:        #a35c3c;
  --serif: "Cinzel", Georgia, serif;
  --sans:  "Lato", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

a { color: var(--gold); }

.brand {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--gold);
}

/* ---- Login ---------------------------------------------------------------- */
.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 10%, rgba(184,147,63,.16), transparent 58%),
    var(--paper);
}

.login {
  width: 100%;
  max-width: 380px;
  padding: 34px 26px 30px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  box-shadow: 0 18px 44px -32px rgba(60, 46, 18, .55);
}
.login .brand { display: block; text-align: center; }
.login h1 {
  margin: 8px 0 26px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  text-align: center;
  color: var(--ink);
}
.login label {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.login input {
  width: 100%;
  min-height: 50px;
  margin-bottom: 18px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
}
.login input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(143, 111, 34, .14);
}
.login button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #fff8e6;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.login button:hover { background: var(--gold-lo); }

.alert {
  margin: 0 0 18px;
  padding: 11px 14px;
  border: 1px solid rgba(163, 92, 60, .35);
  border-radius: 10px;
  background: #f9ece6;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--no);
}

/* ---- Chrome --------------------------------------------------------------- */
.adminbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: rgba(246, 241, 231, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar-actions { display: flex; gap: 8px; }
.mini {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
}
.mini:hover { background: var(--gold); border-color: var(--gold); color: #fff8e6; }

.admin-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}
.page-head .sub { margin: 5px 0 0; font-size: 13.5px; color: var(--ink-soft); }

/* ---- Stats ---------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}
.stat-foot { font-size: 12px; color: var(--ink-soft); }
.stat-yes .stat-value { color: var(--yes); }
.stat-no  .stat-value { color: var(--no); }

/* ---- Panels --------------------------------------------------------------- */
.panel {
  padding: 20px 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.panel h2 {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.empty {
  margin: 10px 0;
  padding: 26px 10px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ---- Chart ---------------------------------------------------------------- */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 130px;
}
.bar-slot { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; }
.bar {
  display: block;
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  min-height: 2px;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 11px;
  color: var(--muted);
}

/* ---- Filters -------------------------------------------------------------- */
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.f-row { display: flex; flex-wrap: wrap; gap: 10px; }
.filters input,
.filters select {
  flex: 1 1 140px;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
}
.filters input:focus, .filters select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(143, 111, 34, .12);
}
.f-search input { width: 100%; }

.btn-primary {
  flex: 1 1 120px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #fff8e6;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-primary:hover { background: var(--gold-lo); }
.btn-plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 120px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
}
.btn-plain:hover { background: var(--paper-3); }

.result-count {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---- Table ---------------------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.guests {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
}
.guests th {
  padding: 10px 12px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.guests th a { text-decoration: none; color: inherit; }
.guests th a:hover { color: var(--gold); }
.guests td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.guests tr:hover td { background: var(--paper); }

.c-name { font-weight: 700; color: var(--ink); }
.c-meta {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--muted);
}
.c-phone { text-decoration: none; white-space: nowrap; }
.c-wa {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  text-decoration: none;
}
.c-wa:hover { color: var(--yes); }
.c-date { white-space: nowrap; color: var(--ink); }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pill-yes { background: #e6f0e8; color: var(--yes); border: 1px solid rgba(63, 125, 85, .3); }
.pill-no  { background: #f9ece6; color: var(--no);  border: 1px solid rgba(163, 92, 60, .3); }

.c-act { text-align: right; }
.btn-del {
  border: 1px solid rgba(163, 92, 60, .3);
  border-radius: 999px;
  background: transparent;
  color: var(--no);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 13px;
  cursor: pointer;
}
.btn-del:hover { background: #f9ece6; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.pager a { text-decoration: none; font-weight: 700; }

/* Below this width the table becomes a list of cards, so nothing is hidden
   behind a horizontal scroll on a phone. */
@media (max-width: 719px) {
  .table-scroll { overflow-x: visible; }
  .guests { min-width: 0; display: block; }
  .guests thead { display: none; }
  .guests tbody { display: block; }
  .guests tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding: 14px 14px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--paper-2);
  }
  .guests tr:hover td { background: transparent; }
  .guests td { padding: 0; border: 0; }
  .guests td[data-label]::before {
    display: block;
    margin-bottom: 2px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    content: attr(data-label);
  }
  .guests .c-name {
    grid-column: 1 / -1;
    font-size: 16px;
  }
  .guests .c-name .c-meta { display: inline-block; margin-left: 8px; }
  .guests td[data-label="Answer"] { grid-column: 2; grid-row: 3; text-align: right; }
  .guests td[data-label="Phone"]  { grid-column: 1; grid-row: 2; }
  .guests .c-date { grid-column: 1; grid-row: 3; }
  .guests .c-act  { grid-column: 2; grid-row: 2; align-self: start; }
}

/* ---- Wider ---------------------------------------------------------------- */
@media (min-width: 720px) {
  .admin-wrap { padding: 30px 24px 70px; gap: 22px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .panel { padding: 26px 24px; }
  .filters { flex-direction: row; align-items: center; }
  .f-search { flex: 2 1 260px; }
  .f-row { flex: 3 1 auto; }
}
