:root {
  --ink: #05070b;
  --navy: #061529;
  --navy-2: #0a2744;
  --blue: #153a68;
  --gold: #e4a936;
  --gold-2: #f4d187;
  --rose: #f1c7c8;
  --paper: #fffaf3;
  --muted: #c9d3df;
  --line: rgba(228, 169, 54, 0.34);
  --glass: rgba(255, 250, 243, 0.07);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 0, rgba(241, 199, 200, 0.18), transparent 22rem),
    radial-gradient(circle at 90% 4%, rgba(228, 169, 54, 0.2), transparent 26rem),
    linear-gradient(120deg, #020811 0%, #061529 48%, #091d35 100%);
  color: var(--paper);
  font-size: 16px;
  line-height: 1.45;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(244, 209, 135, 0.72);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

.icon {
  display: inline-block;
  width: 1.08em;
  height: 1.08em;
  flex: 0 0 auto;
  fill: none;
  vertical-align: -0.14em;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(14px, env(safe-area-inset-left)) 10px max(14px, env(safe-area-inset-right));
  border-bottom: 1px solid rgba(228, 169, 54, 0.14);
  background: rgba(3, 12, 24, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 58px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0.9;
}

.brand span {
  display: grid;
  min-width: 0;
}

.brand small,
.eyebrow {
  color: var(--gold-2);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand strong {
  overflow: hidden;
  color: white;
  font-size: 0.9rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-header nav {
  display: none;
}

.admin-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 14px 12px calc(96px + env(safe-area-inset-bottom));
}

.dashboard-hero,
.role-split,
.panel,
.metric-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(11, 42, 74, 0.94), rgba(5, 21, 41, 0.98)),
    var(--navy-2);
  box-shadow: var(--shadow);
}

.dashboard-hero {
  display: grid;
  gap: 16px;
  overflow: hidden;
  border-radius: 26px;
  padding: 18px;
}

.dashboard-copy h1 {
  margin: 6px 0 10px;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.05rem, 11vw, 4.4rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
}

.dashboard-copy p {
  max-width: 56rem;
  margin: 0;
  color: rgba(255, 250, 243, 0.78);
}

.hero-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 15px;
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:active {
  transform: scale(0.985);
}

.button.primary {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #f1bb53, #c7831e);
  color: white;
  box-shadow: 0 14px 34px rgba(194, 119, 29, 0.3);
}

.button.ghost,
.button.quiet {
  background: rgba(255, 255, 255, 0.065);
  color: var(--gold-2);
}

.button.ghost {
  border-color: var(--gold);
}

.button.quiet {
  border-color: rgba(255, 255, 255, 0.14);
}

.preview-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-radius: 22px;
  background: #05070b;
}

.preview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 38%, rgba(5, 7, 11, 0.88));
}

.preview-card div {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid rgba(244, 209, 135, 0.36);
  border-radius: 18px;
  background: rgba(6, 21, 41, 0.82);
  backdrop-filter: blur(12px);
}

.preview-card span,
.preview-card small {
  color: rgba(255, 250, 243, 0.72);
  font-size: 0.76rem;
  font-weight: 850;
}

.preview-card strong {
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 400;
}

.role-split {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 22px;
}

.role-split article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 250, 243, 0.06);
}

.role-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(244, 209, 135, 0.42);
  border-radius: 15px;
  color: var(--gold-2);
}

.role-split h2,
.panel h2 {
  margin: 0;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0;
}

.role-split p,
.panel p {
  margin: 3px 0 0;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.metric-card {
  display: grid;
  min-height: 128px;
  gap: 10px;
  align-content: space-between;
  border-radius: 20px;
  padding: 14px;
}

.metric-card .icon {
  color: var(--gold-2);
  font-size: 1.3rem;
}

.metric-card strong {
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 400;
  line-height: 0.9;
}

.metric-card span {
  color: rgba(255, 250, 243, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
}

.metric-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.metric-progress i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--rose));
}

.panel-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.panel {
  overflow: hidden;
  border-radius: 24px;
  padding: 14px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-header.compact {
  margin-bottom: 6px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(228, 169, 54, 0.36);
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.06);
  color: var(--gold-2);
}

.toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.search-field {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-2);
}

.search-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
}

.search-field input::placeholder {
  color: rgba(255, 250, 243, 0.48);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 250, 243, 0.7);
  font-size: 0.72rem;
  font-weight: 900;
}

.segmented button.is-active {
  background: linear-gradient(180deg, #f1bb53, #c7831e);
  color: white;
}

.guest-list,
.message-list,
.gift-list,
.insight-stack {
  display: grid;
  gap: 10px;
}

.guest-row,
.message-row,
.gift-row,
.insight-stack article {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 250, 243, 0.06);
}

.guest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
}

.guest-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.guest-main strong,
.message-row strong,
.gift-row strong {
  color: white;
}

.guest-main small,
.guest-meta,
.gift-row small,
.message-row small {
  color: rgba(255, 250, 243, 0.64);
  font-size: 0.78rem;
  font-weight: 760;
}

.guest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guest-meta span,
.status-pill,
.panel-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.status-pill {
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 0.7rem;
  font-weight: 950;
  white-space: nowrap;
}

.status-pill.confirmed {
  border-color: rgba(107, 227, 166, 0.42);
  color: #92f0bd;
}

.status-pill.pending {
  border-color: rgba(244, 209, 135, 0.42);
  color: var(--gold-2);
}

.status-pill.declined {
  border-color: rgba(255, 139, 139, 0.36);
  color: #ffabab;
}

.insight-stack article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
}

.insight-stack .icon {
  color: var(--gold-2);
  font-size: 1.25rem;
}

.tables-panel {
  margin-top: 12px;
}

.panel-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(228, 169, 54, 0.28);
  color: var(--gold-2);
  font-size: 0.72rem;
  font-weight: 900;
}

.tables-layout {
  display: grid;
  gap: 12px;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.table-card {
  display: grid;
  min-height: 150px;
  gap: 10px;
  justify-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 250, 243, 0.055);
  color: var(--paper);
}

.table-card.is-active {
  border-color: rgba(244, 209, 135, 0.72);
  box-shadow: inset 0 0 0 1px rgba(244, 209, 135, 0.25);
}

.mini-table {
  position: relative;
  width: 86px;
  height: 86px;
}

.mini-table::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(244, 209, 135, 0.48);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 250, 243, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(10, 39, 68, 0.96), rgba(4, 12, 22, 0.96));
  content: "";
}

.seat {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-38px);
}

.seat.confirmed {
  border-color: rgba(244, 209, 135, 0.8);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}

.seat.pending {
  border-color: rgba(139, 207, 255, 0.58);
  background: rgba(139, 207, 255, 0.32);
}

.table-card strong {
  color: white;
  font-size: 0.9rem;
}

.table-card small {
  color: var(--muted);
  font-weight: 800;
}

.table-detail {
  min-height: 240px;
  padding: 14px;
  border: 1px solid rgba(228, 169, 54, 0.24);
  border-radius: 20px;
  background: rgba(255, 250, 243, 0.055);
}

.table-detail h3 {
  margin: 0;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.table-detail p {
  margin: 4px 0 14px;
}

.table-guest-list {
  display: grid;
  gap: 8px;
}

.table-guest-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.table-guest-list span {
  color: rgba(255, 250, 243, 0.66);
  font-size: 0.78rem;
  font-weight: 850;
}

.message-row,
.gift-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.message-avatar,
.gift-row img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.message-avatar {
  display: grid;
  place-items: center;
  border: 1px solid rgba(228, 169, 54, 0.36);
  color: var(--gold-2);
  font-weight: 950;
}

.gift-row img {
  object-fit: cover;
}

.gift-row footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 50;
  display: none;
  padding: 14px 16px;
  border: 1px solid rgba(244, 209, 135, 0.46);
  border-radius: 16px;
  background: rgba(5, 13, 25, 0.96);
  color: var(--paper);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.toast.is-visible {
  display: block;
}

.mobile-admin-nav {
  position: fixed;
  right: 12px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 12px;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(228, 169, 54, 0.28);
  border-radius: 18px;
  background: rgba(4, 13, 25, 0.94);
  backdrop-filter: blur(18px);
}

.mobile-admin-nav a {
  display: grid;
  min-height: 54px;
  place-items: center;
  gap: 2px;
  border-radius: 14px;
  color: rgba(255, 250, 243, 0.7);
  font-size: 0.68rem;
  font-weight: 850;
}

.mobile-admin-nav a.is-active,
.mobile-admin-nav a:active {
  background: rgba(228, 169, 54, 0.16);
  color: var(--gold-2);
}

@media (max-width: 370px) {
  .brand strong {
    max-width: 112px;
  }

  .metric-grid,
  .table-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 680px) {
  .admin-shell {
    padding-inline: 20px;
  }

  .dashboard-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    align-items: stretch;
    padding: 22px;
  }

  .hero-actions,
  .role-split,
  .toolbar {
    grid-template-columns: repeat(3, minmax(0, auto));
    align-items: center;
  }

  .role-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .table-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .secondary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 980px) {
  body {
    background: #f7f2ea;
    color: var(--ink);
  }

  .admin-header {
    padding-inline: clamp(28px, 4vw, 56px);
  }

  .admin-header nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: white;
    font-weight: 900;
  }

  .admin-header nav a {
    color: rgba(255, 250, 243, 0.82);
  }

  .admin-header .nav-cta {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--gold);
    border-radius: 14px;
    color: var(--gold-2);
    display: inline-flex;
    align-items: center;
  }

  .admin-shell {
    padding: 22px 28px 52px;
  }

  .panel-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  }

  .tables-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
  }

  .table-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mobile-admin-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
