:root {
  --ink: #101522;
  --muted: #667085;
  --line: #e8e1db;
  --paper: #fffdfa;
  --paper-deep: #f7f2ec;
  --red: #b90012;
  --red-dark: #92000d;
  --gold: #bd7a28;
  --green: #1f9d5a;
  --amber: #d9901f;
  --shadow: 0 22px 60px rgba(42, 22, 18, 0.14);
  font-family: "Georgia", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.public-body,
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(185, 0, 18, 0.08), transparent 26%),
    linear-gradient(135deg, #fff 0%, #faf6f1 100%);
}

.phone-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.invite-card,
.auth-card {
  position: relative;
  width: min(100%, 390px);
  min-height: 720px;
  overflow: hidden;
  padding: 42px 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 253, 250, 0.94)),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.invite-card {
  display: none;
}

.invite-card.active {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: cardIn 280ms ease;
}

.ornamental::before,
.ornamental::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(189, 122, 40, 0.55);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  width: 260px;
  height: 260px;
}

.ornamental::before {
  top: -90px;
  right: -130px;
  transform: rotate(18deg);
}

.ornamental::after {
  bottom: -130px;
  left: -140px;
  transform: rotate(36deg);
}

.vertical-year {
  position: absolute;
  right: 24px;
  top: 36px;
  display: grid;
  gap: 2px;
  font-size: 14px;
  letter-spacing: 0;
}

.school,
.smallcaps,
.eyebrow,
.footer-label {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 12px;
}

.school {
  max-width: 190px;
  line-height: 1.7;
}

.short-line {
  width: 24px;
  height: 2px;
  margin: 18px 0 54px;
  background: var(--red);
}

.short-line.centered {
  margin: 22px auto;
}

.smallcaps {
  text-align: center;
  line-height: 1.8;
}

.invite-card h1 {
  margin: 14px 0 0;
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(42px, 13vw, 58px);
  font-weight: 500;
  line-height: 0.95;
}

.year-title {
  position: relative;
  margin: 18px 0 34px;
  text-align: center;
  font-size: 26px;
  letter-spacing: 9px;
}

.year-title::before,
.year-title::after {
  content: "";
  display: inline-block;
  width: 36px;
  height: 1px;
  margin: 0 14px 8px 5px;
  background: rgba(185, 0, 18, 0.5);
}

.year-title::after {
  margin: 0 5px 8px 14px;
}

.guest-name {
  min-height: 58px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 18px;
  line-height: 1.7;
}

.event-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 34px;
  text-align: center;
}

.event-strip > div {
  min-height: 58px;
  display: grid;
  align-content: center;
  border-right: 1px solid rgba(189, 122, 40, 0.55);
}

.event-strip > div:last-child {
  border-right: 0;
}

.event-strip strong,
.event-strip span {
  display: block;
}

.event-strip strong {
  text-transform: uppercase;
  color: var(--red);
  font-size: 16px;
}

.event-strip span {
  text-transform: uppercase;
  font-size: 10px;
  line-height: 1.4;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0 20px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.primary {
  color: #fff;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  box-shadow: 0 14px 28px rgba(185, 0, 18, 0.24);
}

.outline,
.ghost {
  color: var(--red);
  background: #fff;
  border-color: rgba(185, 0, 18, 0.42);
}

.ghost {
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}

.wide-btn {
  width: 100%;
}

.top-space {
  margin-top: 42px;
}

.center-copy {
  max-width: 290px;
  margin: 0 auto;
  text-align: center;
  color: #283142;
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.graduates {
  display: grid;
  gap: 18px;
  margin: 30px 0;
  text-align: center;
}

.graduates h2 {
  margin: 0 0 7px;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-weight: 400;
  font-size: 18px;
}

.graduates span {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 10px;
}

.graduates b {
  color: var(--red);
  font-size: 32px;
  font-weight: 400;
}

.bottom-school {
  max-width: none;
  text-align: center;
}

.screen-title {
  margin: 0;
  text-transform: uppercase;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 500;
}

.detail-list {
  display: grid;
  gap: 22px;
  margin: 8px 0 26px;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  align-items: center;
}

.detail-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: 21px;
}

.detail-list small {
  display: block;
  text-transform: uppercase;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 10px;
}

.detail-list strong {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.map-preview {
  min-height: 94px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, transparent 24%, rgba(16, 21, 34, 0.05) 25%, transparent 26%),
    linear-gradient(45deg, transparent 24%, rgba(16, 21, 34, 0.05) 25%, transparent 26%),
    #f2f1ef;
  background-size: 34px 34px;
  text-decoration: none;
}

.pin {
  color: var(--red);
  font-size: 30px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 16px 0 22px;
  text-align: center;
}

.countdown p {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 11px;
}

.countdown div {
  border-right: 1px solid rgba(16, 21, 34, 0.22);
}

.countdown div:last-child {
  border-right: 0;
}

.countdown strong,
.countdown span {
  display: block;
}

.countdown strong {
  font-size: 22px;
}

.countdown span {
  text-transform: uppercase;
  font-size: 8px;
}

.rsvp-center {
  display: grid;
  gap: 18px;
  margin: auto 0;
}

.rsvp-center .screen-title,
#doneTitle {
  text-align: center;
}

.response-btn {
  width: 100%;
  min-height: 64px;
  justify-content: space-between;
}

.confirm-mark {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  margin: 72px auto 28px;
  color: var(--red);
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 48px;
}

.footer-label {
  margin: 44px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 9px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-card {
  min-height: 520px;
}

.auth-card h1 {
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 500;
  font-size: 26px;
}

.auth-subtitle {
  margin: 0 0 42px;
  color: var(--muted);
  font-family: Arial, sans-serif;
}

.form-stack,
.form-grid {
  display: grid;
  gap: 18px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: #303849;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fff;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

.alert.error {
  margin: 16px 0;
  padding: 12px;
  color: var(--red);
  background: rgba(185, 0, 18, 0.08);
  border: 1px solid rgba(185, 0, 18, 0.2);
  border-radius: 5px;
  font-family: Arial, sans-serif;
}

.admin-body {
  min-height: 100vh;
  background: #f6f3ef;
  font-family: Arial, sans-serif;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.sidebar {
  padding: 22px 18px;
  color: #fff;
  background:
    linear-gradient(150deg, rgba(185, 0, 18, 0.92), rgba(16, 21, 34, 0.98)),
    #151515;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.brand-lockup small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 0;
  border-radius: 5px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(185, 0, 18, 0.95);
}

.admin-main {
  padding: 28px;
  overflow: auto;
}

.admin-topbar,
.section-toolbar,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-topbar {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-family: Georgia, "Times New Roman", serif;
}

.admin-topbar h1,
.section-toolbar h2,
.panel h2,
.form-panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.admin-topbar p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.top-actions,
.filters,
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel,
.form-panel,
.table-wrap {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(16, 21, 34, 0.06);
}

.metric {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 16px;
}

.metric-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--red);
  border: 1px solid rgba(185, 0, 18, 0.2);
  border-radius: 50%;
}

.metric-icon::before {
  content: "•";
  font-size: 22px;
}

.metric small {
  display: block;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.panel,
.form-panel {
  padding: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.pill.neutral {
  color: var(--ink);
  background: #f0eee9;
}

.pill.pending {
  color: #825300;
  background: #fff0c6;
}

.pill.confirmed {
  color: #0c6c3b;
  background: #d9f6e5;
}

.pill.declined {
  color: var(--red);
  background: #ffe3e6;
}

.chart {
  display: grid;
  gap: 12px;
  min-height: 230px;
  align-content: center;
  margin-top: 22px;
}

.bar-row {
  display: grid;
  grid-template-columns: 58px 1fr 28px;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 12px;
  display: flex;
  overflow: hidden;
  background: #efe9e2;
  border-radius: 999px;
}

.bar {
  display: block;
  height: 100%;
}

.bar.confirmed {
  background: var(--red);
}

.bar.declined {
  background: var(--gold);
}

.activity-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.activity-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.activity-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
}

.status-dot.confirmed {
  background: var(--green);
}

.status-dot.declined {
  background: var(--red);
}

.filters {
  min-width: min(100%, 520px);
}

.filters input {
  flex: 1;
}

.filters select {
  width: 170px;
}

.table-wrap {
  margin-top: 16px;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 3px;
  color: var(--muted);
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  margin-right: 4px;
  color: var(--red);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: rgba(185, 0, 18, 0.45);
}

.icon-btn.danger {
  color: #cc0014;
}

.form-panel {
  max-width: 880px;
}

.security-panel {
  margin-top: 18px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.wide {
  grid-column: 1 / -1;
}

.generated-link {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.generated-link > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.generated-link div {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  min-width: 220px;
  padding: 14px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty,
.empty-row {
  color: var(--muted);
  text-align: center;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 14px;
  }

  .brand-lockup {
    margin-bottom: 12px;
  }

  .side-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

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

  .admin-topbar,
  .section-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .phone-stage {
    padding: 0;
  }

  .invite-card,
  .auth-card {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .invite-card {
    padding: 34px 24px;
  }

  .admin-main {
    padding: 18px;
  }

  .top-actions,
  .filters,
  .form-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .filters select {
    width: 100%;
  }

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

  .wide {
    grid-column: auto;
  }
}
