@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --primary-color: #0b8f5a;
  --secondary-color: #0a6d45;
  --accent-color: #f0be2d;
  --background-color: #f7f8f4;
  --surface-color: #ffffff;
  --text-color: #131a16;
  --text-muted: #4f5f56;
  --border-color: #d7e3db;
  --radius-md: 1rem;
  --radius-sm: 0.75rem;
  --container-max: 1120px;
  --section-space: 5rem;
  --shadow-soft: 0 8px 26px rgba(11, 109, 69, 0.08);
  --shadow-layered: 0 14px 30px rgba(7, 79, 50, 0.1), 0 4px 14px rgba(11, 109, 69, 0.06);
  --transition: 0.22s ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--background-color);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--secondary-color);
  text-decoration-color: rgba(10, 109, 69, 0.35);
  transition: color var(--transition), text-decoration-color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--primary-color);
  text-decoration-color: var(--primary-color);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 0.9rem;
  color: var(--text-muted);
}

img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  object-fit: cover;
}

.shell {
  width: min(var(--container-max), 92vw);
  margin: 0 auto;
}

.section {
  padding: var(--section-space) 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(11, 143, 90, 0.08), rgba(240, 190, 45, 0.08));
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--secondary-color);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--secondary-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #f5fff9;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 auto;
  border: none;
  border-radius: 50%;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #f5fff9;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav a {
  color: #eef5f1;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  border: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-color);
}

.site-nav a.is-active {
  border-color: rgba(240, 190, 45, 0.45);
  background: rgba(240, 190, 45, 0.15);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 22%, rgba(240, 190, 45, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 82% 12%, rgba(11, 143, 90, 0.2) 0%, transparent 36%),
    linear-gradient(138deg, rgba(10, 109, 69, 0.13), rgba(240, 190, 45, 0.15));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(circle, rgba(10, 109, 69, 0.18) 0.5px, transparent 0.5px);
  background-size: 22px 22px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.4rem;
  align-items: center;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(215, 227, 219, 0.8);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-layered);
  padding: 1.35rem;
}

.login-heading {
  color: var(--secondary-color);
}

.container {
  width: min(var(--container-max), 92vw);
  margin: 0 auto;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: clamp(1rem, 1.5vw + 0.8rem, 1.85rem);
  box-shadow: var(--shadow-soft);
}

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

.block {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 5px 16px rgba(10, 109, 69, 0.05);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.block:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(10, 109, 69, 0.09);
}

.notice {
  background: #fff9e8;
  border: 1px solid #f3dd97;
  border-left: 4px solid var(--accent-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.24rem 0.58rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status.payment_pending {
  background: #fff9e8;
  border-color: #f2db96;
  color: #8f6900;
}

.status.approved {
  background: #e7f7ef;
  border-color: #a9d9be;
  color: #0f6b41;
}

.status.cancelled {
  background: #fbecec;
  border-color: #e7bcbc;
  color: #912e2e;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.62rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), color var(--transition), border-color var(--transition);
}

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

.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(240, 190, 45, 0.55);
  outline-offset: 2px;
}

.btn,
.btn.success {
  color: #ffffff;
  background: linear-gradient(130deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 9px 20px rgba(11, 143, 90, 0.22);
}

.btn:hover,
.btn:focus-visible,
.btn.success:hover,
.btn.success:focus-visible {
  box-shadow: 0 12px 22px rgba(11, 143, 90, 0.28);
}

.btn.secondary,
.btn.danger {
  color: var(--primary-color);
  background: var(--surface-color);
  border-color: var(--border-color);
  box-shadow: 0 4px 12px rgba(10, 109, 69, 0.08);
}

.btn.secondary:hover,
.btn.secondary:focus-visible,
.btn.danger:hover,
.btn.danger:focus-visible {
  background: rgba(11, 143, 90, 0.06);
  border-color: var(--primary-color);
}

.btn[disabled] {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  box-shadow: var(--shadow-soft);
}

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

.table th,
.table td {
  border-bottom: 1px solid var(--border-color);
  padding: 0.72rem;
  text-align: left;
  vertical-align: top;
}

.table th {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary-color);
  background: #eff5f1;
}

.table tbody tr:hover {
  background: #f9fcf9;
}

.error {
  color: #9f1f1f;
  font-weight: 700;
}

.summary {
  background: linear-gradient(140deg, #eef8f2, #fff8e7);
  border-radius: var(--radius-sm);
  border: 1px solid #d8e8df;
  padding: 0.75rem;
  margin-top: 0.8rem;
}

.attendee-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.64rem 0;
  border-bottom: 1px solid #e8f0eb;
}

.ticket-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.counter-btn {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #f3faf6;
  color: var(--secondary-color);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.counter-btn:hover,
.counter-btn:focus-visible {
  border-color: var(--primary-color);
  background: #e6f6ee;
}

.counter-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.counter-count {
  min-width: 1.6rem;
  text-align: center;
  font-weight: 800;
  color: var(--secondary-color);
}

select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
  width: 100%;
  max-width: 420px;
  padding: 0.56rem 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: 0.7rem;
  background: #fcfefd;
  color: var(--text-color);
  font: inherit;
}

input[type="checkbox"] {
  accent-color: var(--primary-color);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary-color);
  background: #f3faf6;
}

.pill.active {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: #ffffff;
}

.site-footer {
  margin-top: 2.5rem;
  padding: 2rem 0;
  background: #eef5f0;
  border-top: 1px solid #d5e3da;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.2rem;
}

.footer-title {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
  font-weight: 800;
}

.footer-links a {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--primary-color);
}

.muted {
  color: var(--text-muted);
}

.admin-page .container {
  width: min(1520px, 98vw);
}

.admin-page .table {
  min-width: 1320px;
}

.admin-page #table th,
.admin-page #table td {
  white-space: nowrap;
}

.admin-page #table th:nth-child(2),
.admin-page #table td:nth-child(2) {
  min-width: 110px;
}

.admin-page #table th:nth-child(3),
.admin-page #table td:nth-child(3) {
  white-space: normal;
  min-width: 220px;
}

.admin-page #table th:nth-child(1),
.admin-page #table td:nth-child(1) {
  min-width: 130px;
}

.admin-page #table th:nth-child(9),
.admin-page #table td:nth-child(9) {
  min-width: 72px;
  text-align: center;
}

.admin-page #table th:nth-child(4),
.admin-page #table td:nth-child(4) {
  min-width: 240px;
}

.admin-page #table th:nth-child(10),
.admin-page #table td:nth-child(10) {
  min-width: 230px;
}

.admin-page #table td:nth-child(10) .btn {
  white-space: nowrap;
}

.admin-invitations-page .container {
  width: min(1520px, 98vw);
}

.admin-invitations-page .table {
  min-width: 1180px;
}

.admin-invitations-page #table th,
.admin-invitations-page #table td {
  white-space: nowrap;
}

.admin-invitations-page #table th:nth-child(3),
.admin-invitations-page #table td:nth-child(3),
.admin-invitations-page #table th:nth-child(6),
.admin-invitations-page #table td:nth-child(6) {
  white-space: normal;
}

.admin-invitations-page #table th:nth-child(2),
.admin-invitations-page #table td:nth-child(2) {
  min-width: 110px;
}

.admin-invitations-page #table th:nth-child(3),
.admin-invitations-page #table td:nth-child(3) {
  min-width: 100px;
}

.admin-invitations-page #table th:nth-child(4),
.admin-invitations-page #table td:nth-child(4) {
  min-width: 220px;
}

.admin-invitations-page #table th:nth-child(6),
.admin-invitations-page #table td:nth-child(6) {
  min-width: 360px;
}

.admin-invitations-page #table td:nth-child(6) a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-page .container {
  width: min(1520px, 98vw);
}

.profile-page #memberBlock {
  width: 100%;
}

.profile-page .profile-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.profile-page .profile-events-grid .block {
  margin-bottom: 0;
}

.booking-page #content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.booking-page #content .block {
  flex: 1 1 300px;
  max-width: 420px;
  margin-bottom: 0;
}

.wait-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  z-index: 2000;
}

.wait-overlay[hidden] {
  display: none;
}

.wait-dialog {
  width: min(460px, 92vw);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 0.9rem;
  box-shadow: var(--shadow-layered);
  padding: 1.2rem 1rem;
  text-align: center;
}

.wait-dialog p {
  margin: 0.25rem 0;
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  :root {
    --section-space: 4rem;
  }

  .header-inner {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    right: 4vw;
    top: 62px;
    width: min(270px, 92vw);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    box-shadow: var(--shadow-layered);
    padding: 0.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    color: var(--secondary-color);
    border: 1px solid transparent;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible,
  .site-nav a.is-active {
    color: var(--primary-color);
    border-color: var(--border-color);
    background: #f4faf7;
  }

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

  .table {
    min-width: 620px;
  }
}
