@font-face {
  font-family: "Desdemona Black";
  src: url("../assets/desdemona-black.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #11110f;
  --ink-soft: #57534c;
  --cream: #f4efe5;
  --paper: #fcfaf5;
  --line: rgba(17, 17, 15, 0.18);
  --line-soft: rgba(17, 17, 15, 0.09);
  --font: "Desdemona Black", "Baskerville", "Georgia", serif;
  --shadow: 0 1.25rem 4rem rgba(17, 17, 15, 0.10);
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body {
  margin: 0;
  min-width: 20rem;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(255,255,255,.7), transparent 32rem),
    var(--cream);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
}
body:has(.guest-dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 .45rem; color: var(--ink-soft); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }
h1, h2 { margin: 0; font-weight: 400; }
h1 { font-size: clamp(2rem, 6vw, 4.75rem); line-height: .95; }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1; }
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1.25rem; background: linear-gradient(rgba(244,239,229,.93), rgba(244,239,229,.93)), url("../assets/vintage-nola-hero-poster.webp") center / cover; }
.gate__card { width: min(100%, 29rem); padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line); background: rgba(252,250,245,.98); box-shadow: var(--shadow); }
.gate__copy { margin: 1rem 0 1.5rem; color: var(--ink-soft); }
.gate label, .field { display: grid; gap: .42rem; }
.gate label span, .field > span { color: var(--ink-soft); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 0; padding: .72rem .78rem; color: var(--ink); background: #fffdf8; }
input[type="checkbox"] { width: 1rem; height: 1rem; padding: 0; accent-color: var(--ink); }
textarea { resize: vertical; }
.gate__error { margin: .7rem 0 0; color: #8b1e1e; font-size: .88rem; }
.button { display: inline-flex; min-height: 2.65rem; align-items: center; justify-content: center; border: 1px solid var(--ink); padding: .6rem .9rem; text-decoration: none; background: transparent; }
.button--dark { color: var(--cream); background: var(--ink); }
.button--ghost { color: var(--ink); border-color: var(--line); background: rgba(252,250,245,.76); }
.gate .button { width: 100%; margin-top: 1rem; }
.admin { width: min(100% - 2rem, 100rem); margin: 0 auto; padding: 2rem 0 4rem; }
.admin-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1rem 0 1.4rem; border-bottom: 1px solid var(--line); }
.header-actions, .toolbar, .form-actions, .notification-actions, .dashboard-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.status-bar { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; padding: .7rem .85rem; border-left: 3px solid var(--ink); color: var(--ink-soft); background: rgba(252,250,245,.74); font-size: .85rem; }
.status-bar__note { text-align: right; }
.panel { border: 1px solid var(--line); background: rgba(252,250,245,.9); box-shadow: 0 .75rem 2rem rgba(17,17,15,.04); }
.notification-panel { margin-bottom: 1rem; }
.notification-panel--top { margin-top: 1rem; }
.notification-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: end; padding: 1rem; }
.notification-message { grid-row: span 2; }
.notification-actions { align-self: end; }
.notification-help { margin: 0; max-width: 42rem; color: var(--ink-soft); font-size: .82rem; }
.panel__heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.panel__heading--wrap { flex-wrap: wrap; }
.record-id { color: var(--ink-soft); font-size: .82rem; }
.dashboard-panel { overflow: hidden; }
.dashboard-heading { align-items: center; padding-block: .8rem; }
.dashboard-title-row { display: flex; align-items: center; gap: .7rem; }
.total-guests-tile {
  display: inline-flex;
  align-items: baseline;
  gap: .38rem;
  min-height: 2rem;
  padding: .32rem .55rem;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--cream);
  white-space: nowrap;
}
.total-guests-tile span { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
.total-guests-tile strong { font-size: 1.1rem; font-weight: 400; line-height: 1; }
.dashboard-actions { align-items: center; justify-content: flex-end; }
.filter-control select { min-width: 14.5rem; min-height: 2.65rem; padding-block: .55rem; background: #fffdf8; }
.add-guest-button { gap: .35rem; white-space: nowrap; }
.add-guest-button span { font-size: 1.15rem; line-height: 1; }
.search input { min-width: 15rem; min-height: 2.65rem; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.dashboard-table-wrap { max-height: 74vh; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .72rem .65rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 2; color: var(--ink-soft); background: #f8f3e9; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.dashboard-table th:nth-child(1), .dashboard-table td:nth-child(1) { position: sticky; left: 0; z-index: 3; width: 2.5rem; min-width: 2.5rem; background: var(--paper); }
.dashboard-table th:nth-child(2), .dashboard-table td:nth-child(2) { position: sticky; left: 2.5rem; z-index: 3; min-width: 4.1rem; background: var(--paper); }
.dashboard-table th:nth-child(1), .dashboard-table th:nth-child(2) { z-index: 4; background: #f8f3e9; }
.dashboard-table td:nth-child(3) { min-width: 15rem; }
.dashboard-table td:nth-child(5) { min-width: 8rem; }
.dashboard-table td:nth-child(6), .dashboard-table td:nth-child(7) { min-width: 9rem; }
.dashboard-table td:nth-child(8), .dashboard-table td:nth-child(9) { min-width: 7.5rem; white-space: nowrap; }
.dashboard-table td:last-child { min-width: 11rem; white-space: nowrap; }
.guest-name { display: block; font-size: 1rem; }
.guest-meta { display: block; margin-top: .2rem; color: var(--ink-soft); font-size: .72rem; }
.pill { display: inline-block; min-width: 2.4rem; padding: .2rem .45rem; border: 1px solid var(--line); text-align: center; font-size: .74rem; white-space: nowrap; }
.luncheon-status { min-width: 8rem; white-space: nowrap; }
.luncheon-status__response { display: block; margin-top: .25rem; color: var(--ink-soft); font-size: .72rem; }
.detail-missing { color: #8b1e1e; font-style: italic; }
.sms-status { white-space: nowrap; }
.sms-status__meta { display: block; margin-top: .2rem; color: var(--ink-soft); font-size: .7rem; }
.row-edit { min-height: 2rem; padding: .35rem .55rem; border: 1px solid var(--line); background: transparent; }
.row-edit + .row-edit { margin-left: .25rem; }
.empty-state { margin: 0; padding: 2rem 1rem; color: var(--ink-soft); text-align: center; }
.guest-dialog { width: min(46rem, calc(100% - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; background: transparent; overflow: visible; }
.guest-dialog::backdrop { background: rgba(17,17,15,.62); backdrop-filter: blur(3px); }
.guest-dialog__card { max-height: calc(100vh - 2rem); overflow-y: auto; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.guest-dialog__heading { position: sticky; top: 0; z-index: 3; background: var(--paper); }
.guest-dialog__heading-actions { display: flex; align-items: center; gap: .8rem; }
.dialog-close { display: inline-grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid var(--line); background: transparent; font-size: 1.45rem; line-height: 1; }
.guest-form { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; padding: 1rem; }
.field--wide { grid-column: 1 / -1; }
@media (max-width: 68rem) {
  .notification-form { grid-template-columns: 1fr; }
  .notification-message { grid-row: auto; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 43rem) {
  .admin { width: min(100% - 1rem, 100rem); padding-top: .75rem; }
  .admin-header { align-items: flex-start; flex-direction: column; }
  .status-bar { flex-direction: column; }
  .status-bar__note { text-align: left; }
  .guest-form { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .panel__heading { align-items: flex-start; flex-direction: column; }
  .dashboard-actions { align-items: stretch; }
  .dashboard-actions .button, .dashboard-actions .search, .dashboard-actions .filter-control { flex: 1 1 100%; }
  .filter-control select, .search input { min-width: 0; }
  .notification-actions .button { flex: 1 1 100%; }
  .guest-dialog { width: calc(100% - 1rem); max-height: calc(100vh - 1rem); }
  .guest-dialog__card { max-height: calc(100vh - 1rem); }
  .guest-dialog__heading-actions { width: 100%; justify-content: space-between; }
}
