:root {
  --ink: #10231c;
  --muted: #68746f;
  --line: #dfe5e1;
  --paper: #ffffff;
  --wash: #f6f8f6;
  --green: #073f31;
  --green-2: #0e6a50;
  --gold: #bd8424;
  --red: #b62832;
  --amber: #c57a14;
  --shadow: 0 18px 50px rgba(10, 35, 27, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f7faf8 0%, #ffffff 44%, #f4f7f5 100%);
}

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

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  padding: 16px;
}

.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.guest-card {
  max-width: 520px;
  margin: 0 auto;
  overflow: hidden;
}

.topbar {
  background: var(--green);
  color: white;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.brand-mark {
  color: #f2c46e;
  font-family: Georgia, serif;
  font-size: 28px;
  letter-spacing: 0;
}

.language-toggle,
.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.language-toggle button,
.segmented button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 14px;
}

.language-toggle button.active,
.segmented button.active {
  background: var(--green);
  color: white;
}

.guest-body {
  padding: 24px 22px 28px;
}

.intro {
  text-align: center;
  padding: 18px 0 24px;
}

.intro h1 {
  margin: 8px 0 10px;
  font-family: Georgia, serif;
  font-size: clamp(30px, 9vw, 44px);
  font-weight: 500;
  color: var(--green);
}

.intro p,
.muted {
  color: var(--muted);
}

.form-section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}

.form-section h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}

.field label {
  font-weight: 700;
  font-size: 14px;
}

.input,
input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.primary {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  min-height: 52px;
  font-weight: 800;
  margin-top: 18px;
}

.secondary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--green);
  padding: 10px 14px;
  font-weight: 700;
}

.status {
  margin-top: 14px;
  min-height: 24px;
  color: var(--green-2);
  font-weight: 700;
}

.rtl {
  direction: rtl;
}

.dashboard-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.dashboard-top {
  background: var(--green);
  color: white;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px 8px 0 0;
}

.dashboard-main {
  background: white;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 22px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin: 16px 0 22px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metric strong {
  display: block;
  font-size: 30px;
  color: var(--green);
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--wash);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.pill.yes {
  color: var(--green);
  background: #dff4ea;
}

.pill.no {
  color: var(--red);
  background: #fde6e8;
}

.pill.pending {
  color: var(--amber);
  background: #fff0d6;
}

.login {
  max-width: 420px;
  margin: 12vh auto;
  padding: 24px;
}

.events {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.event {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 23, 17, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.open {
  display: flex;
}

.modal .card {
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 20px;
}

.row-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 760px) {
  .shell {
    padding: 0;
  }

  .guest-card,
  .dashboard-shell {
    min-height: 100vh;
    border-radius: 0;
    border: 0;
  }

  .summary-grid,
  .filters {
    grid-template-columns: 1fr;
  }

  .dashboard-main {
    padding: 16px;
  }
}
