:root {
  font-family: Arial, sans-serif;
  color: #172033;
  background: #f3f6f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 420px);
  padding: 28px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
}

.auth-card form {
  display: grid;
  gap: 12px;
}

.auth-card input {
  width: 100%;
  padding: 12px;
  border: 1px solid #b8c4d1;
  border-radius: 8px;
}

.auth-card button,
.admin-header button {
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
}

.auth-card button {
  margin-top: 8px;
  color: #ffffff;
  background: #174a74;
}

.auth-card button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.message {
  min-height: 1.4em;
}

.message.error {
  color: #b42318;
}

.message.success {
  color: #067647;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  color: #ffffff;
  background: #123d63;
}

.admin-header div,
.admin-header nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header a {
  color: #ffffff;
  text-decoration: none;
}

.admin-header a:hover {
  text-decoration: underline;
}

.admin-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.dashboard-card {
  display: block;
  padding: 22px;
  color: inherit;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 12px;
}

.dashboard-card:hover {
  border-color: #174a74;
  box-shadow:
    0 8px 22px
    rgba(23, 74, 116, 0.12);
}

.page-heading,
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.page-heading h1,
.table-toolbar h2 {
  margin-top: 0;
}

.admin-panel {
  margin-bottom: 24px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 12px;
}

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

.nested-form-grid {
  margin-top: 4px;
}

.form-grid label {
  display: grid;
  gap: 7px;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.table-toolbar select {
  width: 100%;
  padding: 10px;
  border: 1px solid #b8c4d1;
  border-radius: 7px;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.table-toolbar select:focus {
  outline: 2px solid rgba(23, 74, 116, 0.18);
  border-color: #174a74;
}

.form-full-width {
  grid-column: 1 / -1;
}

.checkbox-label {
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  margin-right: 20px;
}

.checkbox-label input {
  width: auto;
}

.form-actions {
  display: flex;
  gap: 12px;
}

.form-actions button,
.page-heading button,
.small-button {
  padding: 10px 15px;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  background: #174a74;
}

.form-actions button:hover,
.page-heading button:hover,
.small-button:hover {
  background: #123d63;
}

.secondary-button {
  color: #172033 !important;
  background: #e8edf2 !important;
}

.secondary-button:hover {
  background: #d8e0e8 !important;
}

.danger-button {
  background: #b42318;
}

.danger-button:hover {
  background: #912018;
}

.date-time-group,
.image-upload-fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid #dce3ea;
  border-radius: 9px;
}

.date-time-group legend,
.image-upload-fieldset legend {
  padding: 0 7px;
  font-weight: 700;
}

.date-time-fields {
  display: grid;
  grid-template-columns:
    minmax(170px, 2fr)
    minmax(110px, 1fr);
  gap: 12px;
}

.language-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dce3ea;
}

.language-tab {
  padding: 9px 18px;
  border: 1px solid #b8c4d1;
  border-radius: 7px 7px 0 0;
  color: #172033;
  background: #f8fafc;
}

.language-tab.active {
  color: #ffffff;
  border-color: #174a74;
  background: #174a74;
}

.language-panel[hidden] {
  display: none;
}

.image-upload-fieldset {
  display: grid;
  gap: 12px;
}

.field-help {
  margin: 0;
  color: #667085;
  font-size: 0.875rem;
}

.cover-image-preview {
  display: block;
  width: 100%;
  max-width: 440px;
  max-height: 260px;
  object-fit: cover;
  border: 1px solid #dce3ea;
  border-radius: 9px;
}

.table-container {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #dce3ea;
}

.admin-table th {
  white-space: nowrap;
  background: #f8fafc;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 260px;
}

.small-button {
  padding: 7px 10px;
  font-size: 0.875rem;
}

.muted-text {
  margin-top: 4px;
  color: #667085;
  font-size: 0.875rem;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8edf2;
}

.status-published,
.status-active {
  color: #067647;
  background: #d1fadf;
}

.status-archived,
.status-completed {
  color: #344054;
  background: #eaecf0;
}

.status-cancelled {
  color: #b42318;
  background: #fee4e2;
}

@media (max-width: 760px) {
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading,
  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .form-full-width {
    grid-column: auto;
  }

  .date-time-fields {
    grid-template-columns: 1fr;
  }

  .table-actions {
    min-width: 190px;
  }
}

/* Public homepage */
.public-page {
  min-width: 320px;
  color: #14212b;
  background: #f5f1e8;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(245, 241, 232, 0.92);
  border-bottom: 1px solid rgba(20, 33, 43, 0.1);
  backdrop-filter: blur(14px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #14212b;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: #e4572e;
  border-radius: 50%;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav > a {
  color: #14212b;
  font-weight: 700;
  text-decoration: none;
}

.site-nav > a:hover {
  color: #c64420;
}

.language-switcher {
  display: inline-flex;
  padding: 3px;
  background: #ffffff;
  border: 1px solid rgba(20, 33, 43, 0.12);
  border-radius: 999px;
}

.language-choice {
  padding: 7px 10px;
  color: #52606a;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.language-choice.active {
  color: #ffffff;
  background: #14212b;
}

.hero-section {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  min-height: 650px;
  padding: clamp(72px, 10vw, 140px) clamp(20px, 7vw, 110px);
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 25%, rgba(255, 202, 97, 0.34), transparent 26%),
    linear-gradient(125deg, #163b35 0%, #0d2b29 58%, #14212b 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #e4572e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-section .eyebrow {
  color: #ffc65a;
}

.hero-section h1 {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 660px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-link-button,
.secondary-link-button,
.event-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.primary-link-button {
  color: #14212b;
  background: #ffc65a;
}

.primary-link-button:hover {
  background: #ffd47f;
}

.secondary-link-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.secondary-link-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-visual {
  position: relative;
  min-height: 430px;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.hero-orbit-large {
  inset: 0 4% 2% 8%;
}

.hero-orbit-small {
  inset: 18% 22% 20% 26%;
  border-color: rgba(255, 198, 90, 0.48);
}

.hero-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 230px;
  height: 230px;
  place-content: center;
  padding: 30px;
  text-align: center;
  color: #14212b;
  background: #ffc65a;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.hero-badge strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.hero-badge span {
  margin-top: 8px;
  line-height: 1.4;
}

.content-section {
  padding: clamp(72px, 9vw, 120px) clamp(20px, 7vw, 110px);
}

.events-section {
  background: #f5f1e8;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: 40px;
  margin-bottom: 42px;
}

.section-heading h2,
.about-section h2 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-heading > p {
  margin: 0;
  color: #59666e;
  font-size: 1.05rem;
  line-height: 1.65;
}

.public-message {
  padding: 24px;
  color: #59666e;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(20, 33, 43, 0.2);
  border-radius: 18px;
}

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

.public-event-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #ffffff;
  border: 1px solid rgba(20, 33, 43, 0.1);
  border-radius: 22px;
  box-shadow: 0 16px 48px rgba(20, 33, 43, 0.08);
}

.public-event-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.public-event-placeholder {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 198, 90, 0.8), transparent 24%),
    linear-gradient(135deg, #e4572e, #163b35);
}

.public-event-placeholder span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.public-event-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 25px;
}

.public-event-date {
  margin: 0 0 9px;
  color: #c64420;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.public-event-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  line-height: 1.12;
}

.public-event-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 14px 0 0;
  color: #59666e;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.public-event-meta {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.public-event-meta div {
  display: grid;
  gap: 3px;
}

.public-event-meta dt {
  color: #7a858c;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-event-meta dd {
  margin: 0;
  color: #273943;
  font-weight: 700;
  line-height: 1.4;
}

.event-link-button {
  align-self: flex-start;
  margin-top: auto;
  color: #ffffff;
  background: #163b35;
}

.event-link-button:hover {
  background: #0d2b29;
}

.about-section {
  color: #ffffff;
  background: #e4572e;
}

.about-section .eyebrow {
  color: #ffc65a;
}

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

.feature-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
}

.feature-number {
  color: #ffc65a;
  font-size: 0.78rem;
  font-weight: 900;
}

.feature-card h3 {
  margin: 32px 0 12px;
  font-size: 1.25rem;
}

.feature-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  padding: 34px clamp(20px, 7vw, 110px);
  color: #ffffff;
  background: #14212b;
}

.site-footer p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.65);
}

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

  .hero-visual {
    min-height: 340px;
  }

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

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-end;
    gap: 10px;
  }

  .site-nav > a:not(:last-of-type) {
    display: none;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .public-events-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .site-brand > span:last-child {
    display: none;
  }

  .hero-section {
    min-height: auto;
    padding-top: 86px;
  }

  .hero-visual {
    min-height: 280px;
  }

  .hero-badge {
    width: 190px;
    height: 190px;
  }
}

.event-detail-main {
  min-height: calc(100vh - 170px);
  padding: clamp(50px, 8vw, 100px) clamp(20px, 7vw, 110px);
}

.event-detail {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  max-width: 1240px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid rgba(20, 33, 43, 0.1);
  border-radius: 24px;
  box-shadow: 0 22px 70px rgba(20, 33, 43, 0.1);
}

.event-detail-image {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.event-detail-content {
  padding: clamp(32px, 6vw, 72px);
}

.event-detail-content h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.event-detail-description {
  margin: 26px 0 0;
  color: #59666e;
  font-size: 1.08rem;
  line-height: 1.75;
  white-space: pre-line;
}

.event-detail-meta {
  display: grid;
  gap: 18px;
  margin: 38px 0 0;
  padding-top: 28px;
  border-top: 1px solid rgba(20, 33, 43, 0.12);
}

.event-detail-meta div {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) 1fr;
  gap: 18px;
}

.event-detail-meta dt {
  color: #7a858c;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-detail-meta dd {
  margin: 0;
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .event-detail {
    grid-template-columns: 1fr;
  }

  .event-detail-image {
    min-height: 280px;
    max-height: 440px;
  }
}


/* Public registration (v0.4) */
.registration-main {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.registration-shell {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid #dce3ea;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(23, 74, 116, 0.08);
}

.registration-heading h1 {
  margin: 0.25rem 0 0.5rem;
}

.registration-event-name {
  margin: 0 0 2rem;
  color: #526071;
  font-size: 1.1rem;
}

.registration-form {
  display: grid;
  gap: 1.5rem;
}

.registration-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 650;
}

.registration-form input,
.registration-form select {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #b8c4d1;
  border-radius: 9px;
  background: #ffffff;
  font: inherit;
}

.registration-form input:focus,
.registration-form select:focus {
  outline: 3px solid rgba(23, 74, 116, 0.16);
  border-color: #174a74;
}

.registration-consent {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem !important;
  font-weight: 400 !important;
}

.registration-consent input {
  width: 20px;
  min-height: 20px;
  margin-top: 0.1rem;
}

.registration-actions {
  display: flex;
  justify-content: flex-end;
}

.registration-actions button {
  min-width: 180px;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: #174a74;
  font-weight: 700;
  cursor: pointer;
}

.registration-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.registration-success {
  padding: 2rem 0 1rem;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 50%;
  color: #067647;
  background: #d1fadf;
  font-size: 2rem;
  font-weight: 800;
}

.error-message {
  color: #b42318;
}

@media (max-width: 760px) {
  .registration-main {
    width: min(100% - 1rem, 920px);
    padding-top: 1rem;
  }

  .registration-shell {
    border-radius: 14px;
  }

  .registration-actions,
  .registration-actions button {
    width: 100%;
  }
}

/* Admin participants (v0.5) */
.participant-admin-layout {
  display: grid;
  gap: 1.5rem;
}

.participant-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.participant-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(180px, 0.6fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.participant-filters label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

.participant-filters input,
.participant-filters select {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c8d1da;
  border-radius: 9px;
  background: #fff;
  font: inherit;
}

.participant-table td {
  vertical-align: top;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.6rem !important;
  align-self: end;
  min-height: 44px;
}

.checkbox-label input {
  width: 20px !important;
  min-height: 20px !important;
}

@media (max-width: 900px) {
  .participant-filters {
    grid-template-columns: 1fr;
  }

  .participant-toolbar-actions,
  .participant-toolbar-actions > * {
    width: 100%;
  }
}
