@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
  --park-primary: #ec1c24;
  --park-secondary: #ffd100;
  --park-ink: #1b1b1f;
  --park-surface: #ffffff;
  --line: rgba(18, 48, 68, 0.12);
  --line-strong: rgba(18, 48, 68, 0.2);
  --muted: rgba(18, 48, 68, 0.66);
  --danger: #cc3f45;
  --success: #12866a;
  --soft-blue: #13b5ea;
  --page-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
  --lift-shadow: 0 0.75rem 1.75rem rgba(12, 42, 56, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--park-ink);
  display: flex;
  flex-direction: column;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.public-page {
  background: #f5f8fa url("../img/bg.jpg") center top / cover fixed;
}

.public-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  pointer-events: none;
}

a {
  color: var(--park-primary);
  font-weight: 700;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

button,
.button-link {
  align-items: center;
  background: var(--park-primary);
  border: 1px solid transparent;
  border-radius: 50rem;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
  line-height: 1.2;
  min-height: 3.15rem;
  padding: 0.68rem 1.9rem;
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

button:hover,
.button-link:hover {
  box-shadow: 0 0.6rem 1.4rem color-mix(in srgb, var(--park-primary) 22%, transparent);
  color: #ffffff;
  transform: translateY(-1px);
}

button:disabled {
  background: color-mix(in srgb, var(--park-primary) 35%, #ffffff);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.76;
  transform: none;
}

input,
textarea,
select {
  background: #ffffff;
  border: 1px solid rgba(19, 181, 234, 0.26);
  border-radius: 0.95rem;
  box-shadow: inset 0 1px 2px rgba(10, 36, 52, 0.04);
  color: var(--park-ink);
  font: inherit;
  min-height: 3.25rem;
  padding: 0.76rem 0.95rem;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--park-primary);
  box-shadow: 0 0 0 0.24rem color-mix(in srgb, var(--park-primary) 16%, transparent);
  outline: 0;
}

textarea {
  min-height: 10rem;
  resize: vertical;
}

.site-header,
.local-park-switch,
.shell {
  position: relative;
  z-index: 1;
}

.site-header {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto 1fr;
  margin-bottom: 2.5rem;
  padding: clamp(1.9rem, 4vw, 2.8rem) clamp(1rem, 4vw, 3rem) 0;
  text-align: center;
}

.brand {
  align-items: center;
  color: var(--park-ink);
  display: inline-flex;
  grid-column: 2;
  flex-direction: column;
  gap: 0.6rem;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: 5.25rem;
  max-width: 14.5rem;
  object-fit: contain;
  width: min(14.5rem, 72vw);
}

.local-park-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.local-park-switch a {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(19, 181, 234, 0.18);
  border-radius: 50rem;
  box-shadow: 0 0.35rem 1rem rgba(12, 42, 56, 0.06);
  color: var(--park-ink);
  display: inline-flex;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  justify-content: center;
  min-height: 2.45rem;
  min-width: 3.3rem;
  padding: 0.45rem 0.85rem;
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.local-park-switch a:hover {
  border-color: color-mix(in srgb, var(--park-primary) 35%, transparent);
  transform: translateY(-1px);
}

.local-park-switch a.active {
  background: var(--park-primary);
  border-color: var(--park-primary);
  color: #ffffff;
}

.tfp-topbar {
  display: flex;
  grid-column: 3;
  justify-content: flex-end;
  width: 100%;
}

.tfp-lang {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.06);
  display: inline-flex;
  gap: 2px;
  padding: 3px;
}

.tfp-lang .tfp-flag-btn {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  line-height: 1;
  min-height: 0;
  padding: 4px;
  text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  width: 34px;
}

.tfp-lang .tfp-flag-btn:hover {
  background: #f4f7fb;
  box-shadow: none;
  transform: translateY(-1px);
}

.tfp-lang .tfp-flag-btn.active {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px var(--soft-blue), 0 5px 12px rgba(17, 24, 39, 0.12);
}

.tfp-lang .tfp-flag {
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 50%;
  display: block;
  filter: grayscale(100%);
  height: 24px;
  object-fit: cover;
  opacity: 0.68;
  transition: filter 0.15s ease, opacity 0.15s ease;
  width: 24px;
}

.tfp-lang .tfp-flag-btn:hover .tfp-flag,
.tfp-lang .tfp-flag-btn.active .tfp-flag {
  filter: none;
  opacity: 1;
}

.tfp-flag-btn:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.22);
  outline-offset: 3px;
}

.local-park-switch {
  padding: 0 1rem 0.8rem;
}

.shell {
  flex: 1;
  margin: 1.15rem auto 4rem;
  max-width: 58rem;
  padding: 0 1rem;
  width: 100%;
}

.park-logo-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  justify-content: center;
  margin: 1.35rem auto 0;
}

.park-logo-link {
  align-items: center;
  border-radius: 0.25rem;
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  min-height: 2.85rem;
  opacity: 1;
  padding: 0.3rem 0.25rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  width: clamp(6.1rem, 20vw, 7.25rem);
}

.park-logo-link:hover {
  transform: translateY(-1px);
}

.park-logo-link:focus-visible {
  outline: 2px solid var(--park-primary);
  outline-offset: 0.35rem;
}

.park-logo-link img {
  display: block;
  height: auto;
  max-width: none;
  object-fit: contain;
  width: 100%;
}

.app-version {
  color: rgba(18, 48, 68, 0.46);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  margin: 0.85rem 0 0;
  position: relative;
  text-align: center;
  z-index: 1;
}

.tool-panel {
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: var(--page-shadow);
  margin: 0 auto;
  max-width: 58rem;
  padding: 1.45rem clamp(1rem, 3vw, 1.75rem) 1.65rem;
}

.panel-heading {
  margin-bottom: 1.15rem;
  text-align: center;
}

.eyebrow {
  color: var(--park-primary);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
.h1 {
  display: block;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 2.15rem !important;
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 0;
  padding-bottom: 0.75rem;
  text-align: center;
  width: 100%;
}

h2,
.h2 {
  color: var(--park-ink);
  display: block;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 1.48rem !important;
  font-weight: 500;
  line-height: 1.28;
  margin-bottom: 0;
  padding-bottom: 0.75rem;
  text-align: center;
  width: 100%;
}

h3 {
  color: var(--park-ink);
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0.35rem auto 1rem;
  max-width: 50rem;
  text-align: center;
}

.notice {
  border: 0;
  border-radius: 0.85rem;
  box-shadow: none;
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0 auto 1rem;
  max-width: 44rem;
  padding: 0.82rem 1rem;
  text-align: center;
}

.notice.error,
.calendar-state.error {
  background: #fff0f0;
  border: 1px solid rgba(204, 63, 69, 0.12);
  color: var(--danger);
}

.notice.warning {
  background: #fff8db;
  border: 1px solid rgba(119, 89, 0, 0.12);
  color: #775900;
}

.empty-state {
  border: 1px dashed rgba(18, 48, 68, 0.18);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
}

.empty-state p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.promotion-list {
  display: grid;
  gap: 1rem;
}

.promotion-option {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
  border: 2px solid #d8e3ea;
  border-radius: 1rem;
  box-shadow: 0 0.45rem 1.3rem rgba(12, 42, 56, 0.08);
  padding: 1rem 1.1rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.promotion-option:hover {
  border-color: color-mix(in srgb, var(--park-primary) 40%, #ffffff);
  box-shadow: var(--lift-shadow);
  transform: translateY(-3px);
}

.promotion-option p {
  color: var(--muted);
  line-height: 1.6;
}

.stacked-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.65rem;
}

.stacked-form label {
  color: #102a43;
  display: grid;
  font-weight: 600;
  gap: 0.4rem;
}

.stacked-form label span {
  font-size: 0.88rem;
}

.stacked-form button {
  justify-self: center;
  min-width: 12rem;
}

#event-form {
  display: grid;
}

#event-submit {
  justify-self: center;
}

.step-back-form {
  display: flex;
  justify-content: center;
  margin: 0.65rem 0 0;
}

.step-back-form.below-submit {
  margin-top: 0.2rem;
}

.text-back-link {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  min-height: 0;
  min-width: 0;
  padding: 0.15rem 0.25rem;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.text-back-link:hover {
  background: transparent;
  box-shadow: none;
  color: var(--park-primary);
  transform: none;
}

.batch-rule,
.batch-summary {
  background: rgba(19, 181, 234, 0.08);
  border: 1px solid rgba(19, 181, 234, 0.18);
  border-radius: 0.9rem;
  color: #102a43;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0.15rem auto 1.05rem;
  max-width: 44rem;
  padding: 0.72rem 0.95rem;
  text-align: center;
}

.batch-rule-main,
.batch-rule-sub {
  display: block;
}

.batch-rule-sub {
  margin-top: 0.18rem;
}

.barcode-list {
  display: grid;
  gap: 0.85rem;
}

.barcode-row {
  align-items: end;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

.barcode-row.can-remove {
  grid-template-columns: 1fr 2.45rem;
}

.barcode-row label {
  margin: 0;
}

.stacked-form .remove-barcode {
  align-self: end;
  background: #eef1f4;
  border: 1px solid rgba(18, 48, 68, 0.08);
  border-radius: 999px;
  box-shadow: none;
  color: #17202a;
  font-size: 1.18rem;
  font-weight: 600;
  height: 2.45rem;
  line-height: 1;
  min-height: 0;
  min-width: 0;
  padding: 0;
  width: 2.45rem;
}

.stacked-form .remove-barcode:hover {
  background: #dde4ea;
  box-shadow: none;
  color: #17202a;
  transform: none;
}

.stacked-form .remove-barcode:disabled {
  display: none;
}

.barcode-actions {
  display: flex;
  justify-content: center;
}

.batch-preview {
  border: 1px dashed rgba(18, 48, 68, 0.2);
  border-radius: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 0.8rem 1rem;
  text-align: center;
}

.batch-preview.is-ready {
  background: rgba(18, 134, 106, 0.1);
  border-color: rgba(18, 134, 106, 0.22);
  color: var(--success);
}

.batch-preview.is-incomplete {
  background: #fff8db;
  border-color: rgba(119, 89, 0, 0.16);
  color: #775900;
}

.check-row {
  align-items: start;
  display: grid !important;
  gap: 0.75rem !important;
  grid-template-columns: 1.25rem 1fr;
  line-height: 1.45;
}

.check-row input {
  height: 1.1rem;
  margin-top: 0.22rem;
  min-height: 0;
  width: 1.1rem;
}

.check-row span {
  color: var(--muted);
  font-weight: 500;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin: 0 0 1.25rem;
}

.summary-strip span {
  align-items: center;
  background: rgba(18, 48, 68, 0.05);
  border-radius: 999px;
  color: var(--park-ink);
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.34rem 0.72rem;
}

.summary-strip small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.summary-event-chip strong {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
}

.summary-strip .summary-event-chip small {
  font-size: 0.68rem;
  line-height: 1;
}

.calendar {
  background: #ffffff;
  border: 1px solid rgba(18, 48, 68, 0.1);
  border-radius: 0.9rem;
  box-shadow: 0 0.65rem 1.5rem rgba(18, 48, 68, 0.06);
  margin: 1rem auto;
  max-width: 58rem;
  padding: 0.8rem;
}

.calendar-state {
  background: #ffffff;
  border: 1px dashed rgba(18, 48, 68, 0.16);
  border-radius: 0.7rem;
  color: var(--muted);
  padding: 1rem;
  text-align: center;
}

.calendar-header {
  align-items: center;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 2.45rem 1fr 2.45rem;
  margin-bottom: 0.7rem;
  text-align: center;
}

.calendar-header strong {
  color: #102a43;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.calendar-nav {
  border-radius: 999px;
  min-height: 2.35rem;
  min-width: 2.35rem;
  padding: 0;
}

.calendar-months {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-month {
  min-width: 0;
}

.calendar-month-title {
  color: #102a43;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  text-align: center;
}

.calendar-grid {
  display: grid;
  gap: 0.24rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0;
  padding-bottom: 0.12rem;
  text-align: center;
  text-transform: uppercase;
}

.day {
  align-content: center;
  aspect-ratio: 1.06;
  background: #f7f9fb;
  border: 1px solid #e3eaf0;
  border-radius: 0.5rem;
  box-shadow: none;
  color: #8c99a4;
  display: grid;
  gap: 0.08rem;
  min-height: 0;
  padding: 0;
}

.day.available {
  background: #ffffff;
  border-color: #d8e3ea;
  box-shadow: 0 0.2rem 0.55rem rgba(12, 42, 56, 0.05);
  color: #102a43;
}

.day:disabled {
  background: #ffffff;
  border-color: #e3eaf0;
  color: #a8b3bd;
  cursor: not-allowed;
  opacity: 1;
}

.day.crowd-quiet {
  background: #e9f7ee;
  border-color: #9bd3ad;
  color: #0d5a32;
}

.day.crowd-medium {
  background: #fff8df;
  border-color: #e6ce67;
  color: #6a5300;
}

.day.crowd-busy {
  background: #fff0e7;
  border-color: #e9a069;
  color: #803a12;
}

.day.available:hover {
  border-color: color-mix(in srgb, var(--park-primary) 42%, #ffffff);
  box-shadow: 0 0.45rem 1rem rgba(12, 42, 56, 0.1);
}

.day.active {
  background: var(--park-primary);
  border-color: var(--park-primary);
  box-shadow: 0 0 0 0.18rem #ffffff, 0 0 0 0.34rem color-mix(in srgb, var(--park-primary) 42%, transparent), 0 0.6rem 1.25rem color-mix(in srgb, var(--park-primary) 22%, transparent);
  color: #ffffff;
}

.day-number {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
}

.day-availability {
  font-size: 0.52rem;
  font-weight: 600;
  line-height: 1;
}

.day.empty {
  visibility: hidden;
}

.slot-list {
  margin-top: 0.85rem;
  min-height: 2.4rem;
  text-align: center;
}

.slot-list h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  text-align: center;
}

.slot-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.slot-button {
  background: #ffffff;
  border: 1px solid #d8e3ea;
  color: #102a43;
  font-weight: 600;
  min-height: 2.3rem;
  padding: 0.38rem 0.7rem;
}

.slot-button:hover {
  border-color: color-mix(in srgb, var(--park-primary) 42%, #ffffff);
  color: #102a43;
}

.slot-button.active {
  background: var(--park-primary);
  border-color: var(--park-primary);
  box-shadow: 0 0 0 0.18rem #ffffff, 0 0 0 0.34rem color-mix(in srgb, var(--park-primary) 42%, transparent), 0 0.6rem 1.25rem color-mix(in srgb, var(--park-primary) 22%, transparent);
  color: #ffffff;
}

.result {
  text-align: center;
}

.result-error-code {
  color: rgba(18, 48, 68, 0.48);
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0.5rem 0 0;
}

.result dl {
  border: 1px solid rgba(18, 48, 68, 0.1);
  border-radius: 1rem;
  margin: 1.25rem 0;
  overflow: hidden;
  text-align: left;
}

.result dl div {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 10rem 1fr;
  padding: 0.78rem 0.95rem;
}

.result dl div + div {
  border-top: 1px solid rgba(18, 48, 68, 0.08);
}

.result dt {
  color: var(--muted);
  font-weight: 700;
}

.result dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-page {
  --cda-blue: #061f3f;
  --cda-blue-2: #0b315f;
  --cda-orange: #f28c28;
  --cda-orange-dark: #d87413;
  --cda-ink: #10233d;
  --cda-muted: #66758a;
  --cda-border: rgba(6, 31, 63, 0.12);
  --cda-soft: #f4f7fb;
  background: #eef2f6;
  color: var(--cda-ink);
  font-size: 0.95rem;
  line-height: 1.5;
}

.admin-page button,
.admin-page .button-link {
  background: var(--cda-orange);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 2.65rem;
  padding: 0.58rem 1.25rem;
}

.admin-page a {
  font-weight: 500;
}

.admin-page input,
.admin-page textarea,
.admin-page select {
  border-radius: 0.7rem;
  font-size: 0.92rem;
  min-height: 2.75rem;
  padding: 0.62rem 0.78rem;
}

.admin-page button:hover,
.admin-page .button-link:hover {
  background: var(--cda-orange-dark);
  box-shadow: 0 0.65rem 1.35rem rgba(242, 140, 40, 0.24);
}

.admin-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  background: linear-gradient(180deg, var(--cda-blue) 0%, var(--cda-blue-2) 100%);
  color: #ffffff;
  padding: 1.25rem;
}

.admin-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.15rem;
}

.admin-brand span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
}

.admin-brand strong {
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-nav {
  display: grid;
  gap: 0.45rem;
}

.admin-nav-divider {
  background: rgba(255, 255, 255, 0.16);
  display: block;
  height: 1px;
  margin: 0.42rem 0;
}

.admin-sidebar a {
  border-radius: 0.72rem;
  color: rgba(255, 255, 255, 0.84);
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.62rem 0.72rem;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  background: rgba(242, 140, 40, 0.16);
  color: #ffffff;
  transform: translateX(2px);
}

.admin-sidebar a.active {
  box-shadow: inset 3px 0 0 var(--cda-orange);
}

.admin-main {
  padding: 1.35rem;
}

.admin-version {
  color: var(--cda-muted);
  margin-bottom: 0.5rem;
}

.admin-topbar {
  align-items: start;
  background: linear-gradient(135deg, var(--cda-blue) 0%, var(--cda-blue-2) 78%);
  border-radius: 0.9rem;
  box-shadow: 0 0.6rem 1.4rem rgba(6, 31, 63, 0.12);
  color: #ffffff;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
}

.admin-topbar h1 {
  color: #ffffff;
  font-size: clamp(1.28rem, 2vw, 1.68rem) !important;
  font-weight: 600;
  line-height: 1.18;
  margin: 0;
  padding: 0;
  text-align: left;
}

.admin-topbar p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  margin: 0.25rem 0 0;
}

.admin-kicker {
  color: var(--cda-orange) !important;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-lang {
  flex: 0 0 auto;
}

.admin-page .tfp-lang .tfp-flag-btn.active {
  box-shadow: inset 0 0 0 2px var(--cda-orange), 0 5px 12px rgba(6, 31, 63, 0.18);
}

.admin-page input:focus,
.admin-page textarea:focus,
.admin-page select:focus {
  border-color: var(--cda-orange);
  box-shadow: 0 0 0 0.24rem rgba(242, 140, 40, 0.18);
}

.admin-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.admin-toolbar h2 {
  color: var(--cda-ink);
  font-size: 1.28rem !important;
  font-weight: 600;
  padding-bottom: 0.2rem;
  text-align: left;
}

.admin-toolbar p {
  color: var(--cda-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.admin-stats {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin-bottom: 0.9rem;
}

.admin-stats div {
  background: #ffffff;
  border: 1px solid var(--cda-border);
  border-radius: 0.78rem;
  box-shadow: 0 0.45rem 1rem rgba(6, 31, 63, 0.045);
  color: var(--cda-muted);
  display: grid;
  gap: 0.15rem;
  font-size: 0.82rem;
  padding: 0.75rem 0.85rem;
}

.admin-stats span {
  color: var(--cda-blue);
  font-size: 1.24rem;
  font-weight: 600;
  line-height: 1;
}

.admin-panel {
  background: #ffffff;
  border: 1px solid var(--cda-border);
  border-radius: 0.9rem;
  box-shadow: 0 0.7rem 1.4rem rgba(6, 31, 63, 0.055);
  overflow: hidden;
}

.admin-form {
  display: grid;
  gap: 0.85rem;
  padding: 0.95rem;
}

.admin-form-section {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid var(--cda-border);
  border-radius: 0.78rem;
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem;
}

.admin-section-copy {
  border-left: 3px solid rgba(242, 140, 40, 0.74);
  padding-left: 0.7rem;
}

.admin-section-copy h3 {
  color: var(--cda-blue);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.admin-section-copy p {
  color: var(--cda-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.admin-form .grid {
  align-items: start;
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
}

.admin-park-settings {
  display: grid;
  gap: 0.65rem;
}

.admin-park-row {
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--cda-border);
  border-radius: 0.72rem;
  display: grid;
  gap: 0.72rem;
  grid-template-columns: minmax(11rem, 1.15fr) repeat(4, minmax(8.5rem, 1fr));
  padding: 0.75rem;
}

.admin-park-row strong {
  color: var(--cda-blue);
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
}

.admin-park-row small {
  color: var(--cda-muted);
  display: block;
  font-size: 0.72rem;
  margin-top: 0.12rem;
}

.admin-form label {
  align-content: start;
  color: var(--cda-ink);
  display: grid;
  font-size: 0.86rem;
  font-weight: 500;
  gap: 0.32rem;
}

.admin-form small {
  color: var(--cda-muted);
  display: block;
  font-size: 0.74rem;
  font-weight: 400;
  line-height: 1.45;
}

.admin-rich-field {
  align-content: start;
  display: grid;
  gap: 0.32rem;
}

.format-toolbar {
  display: inline-flex;
  gap: 0.28rem;
}

.format-toolbar button {
  background: #ffffff;
  border: 1px solid var(--cda-border);
  border-radius: 0.52rem;
  box-shadow: none;
  color: var(--cda-blue);
  font-size: 0.82rem;
  font-weight: 600;
  height: 2rem;
  min-height: 0;
  padding: 0;
  width: 2rem;
}

.format-toolbar button:hover {
  background: var(--cda-soft);
  box-shadow: none;
  color: var(--cda-blue);
  transform: none;
}

.format-underline {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.admin-form-actions {
  justify-content: flex-end;
  padding: 0.1rem 0.25rem 0.35rem;
}

.admin-search {
  align-items: center;
}

.admin-search input[type="search"] {
  min-width: min(22rem, 60vw);
}

.admin-table {
  border-collapse: collapse;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid rgba(6, 31, 63, 0.08);
  padding: 0.64rem 0.68rem;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #f8fafc;
  color: rgba(6, 31, 63, 0.7);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table td {
  color: var(--cda-ink);
  font-size: 0.84rem;
}

.admin-table tr:hover td {
  background: rgba(242, 140, 40, 0.04);
}

.admin-table pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-chip {
  background: rgba(242, 140, 40, 0.14);
  border-radius: 999px;
  color: var(--cda-orange-dark);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 600;
  margin-left: 0.4rem;
  padding: 0.18rem 0.5rem;
}

.attempt-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
}

.attempt-chip.valid {
  background: rgba(18, 134, 106, 0.12);
  color: #0f765e;
}

.attempt-chip.invalid {
  background: rgba(204, 63, 69, 0.12);
  color: #a43137;
}

.attempt-chip.error {
  background: rgba(242, 140, 40, 0.16);
  color: var(--cda-orange-dark);
}

.attempt-reason {
  color: var(--cda-muted);
  display: block;
  font-size: 0.74rem;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 0.16rem;
}

.admin-log-status-heading,
.admin-log-status-cell {
  width: 5.5rem;
}

.admin-log-row-error td {
  background: #fff2f2;
  border-bottom-color: rgba(204, 63, 69, 0.32);
  border-top-color: rgba(204, 63, 69, 0.32);
}

.admin-table .admin-log-row-error:hover td {
  background: #ffe9e9;
}

.admin-log-row-error td:first-child {
  border-left: 0.45rem solid #cc3f45;
}

.admin-log-type {
  display: block;
}

.admin-log-row-error .admin-log-type,
.admin-log-row-error summary {
  color: #9f242b;
  font-weight: 800;
}

.admin-log-row-error pre {
  background: rgba(204, 63, 69, 0.07);
  border-left: 0.25rem solid rgba(204, 63, 69, 0.65);
  padding-left: 0.75rem;
}

.admin-log-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.36rem 0.62rem;
}

.admin-log-badge.error {
  background: #cc3f45;
  color: #ffffff;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.inline-actions button,
.inline-actions .button-link {
  font-size: 0.8rem;
  min-height: 2.25rem;
  padding: 0.36rem 0.72rem;
}

.secondary-button,
.admin-page .secondary-button {
  background: #ffffff;
  border-color: var(--cda-border);
  color: var(--cda-blue);
}

.secondary-button:hover,
.admin-page .secondary-button:hover {
  background: var(--cda-soft);
  color: var(--cda-blue);
}

.danger-button,
.admin-page .danger-button {
  background: var(--danger);
}

@media (max-width: 48rem) {
  body {
    font-size: 1rem;
  }

  .site-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.4rem;
    padding-inline: 1rem;
  }

  .local-park-switch a {
    min-width: 3rem;
  }

  .tfp-topbar {
    justify-content: center;
  }

  .shell {
    margin-top: 0.8rem;
    padding: 0 0.8rem;
  }

  .park-logo-links {
    gap: 0.9rem;
    margin-top: 1.05rem;
  }

  .park-logo-link {
    flex: 0 1 auto;
  }

  .park-logo-link img {
    max-width: 100%;
  }

  .tool-panel {
    padding: 1rem;
  }

  h1,
  .h1 {
    font-size: 1.75rem !important;
  }

  h2,
  .h2 {
    font-size: 1.28rem !important;
  }

  .lead {
    font-size: 0.98rem;
  }

  .barcode-row.can-remove {
    grid-template-columns: 1fr 2.35rem;
  }

  .stacked-form .remove-barcode {
    height: 2.35rem;
    width: 2.35rem;
  }

  .calendar {
    padding: 0.65rem;
  }

  .calendar-months {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 0.2rem;
  }

  .day {
    border-radius: 0.44rem;
  }

  .result dl div {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    padding: 1rem;
  }

  .admin-brand {
    margin-bottom: 0.8rem;
    text-align: center;
  }

  .admin-nav {
    grid-template-columns: 1fr 1fr;
  }

  .admin-topbar {
    flex-direction: column;
    padding: 1rem;
  }

  .admin-topbar h1 {
    font-size: 1.55rem !important;
  }

  .admin-lang {
    align-self: center;
  }

  .admin-main {
    padding: 1rem;
  }

  .admin-search,
  .admin-search input[type="search"] {
    width: 100%;
  }

  .admin-form-actions {
    justify-content: flex-start;
  }

  .admin-park-row {
    grid-template-columns: 1fr;
  }
}
