:root {
  --bg: #eef4f1;
  --bg-accent: #d7e8e1;
  --surface: #ffffff;
  --ink: #15312b;
  --muted: #4d665f;
  --teal: #1f6b5c;
  --teal-dark: #155247;
  --blue: #1a5276;
  --line: #c5d8d0;
  --danger: #9b2c2c;
  --warn: #8a5a12;
  --shadow: 0 10px 30px rgba(21, 49, 43, 0.08);
  --radius: 16px;
  --font: "Figtree", system-ui, sans-serif;
  --display: "Source Serif 4", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(26, 82, 118, 0.12), transparent 55%),
    radial-gradient(100% 70% at 0% 100%, rgba(31, 107, 92, 0.16), transparent 50%),
    linear-gradient(180deg, var(--bg-accent), var(--bg) 40%, #f5faf8);
}

.page {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

.page--admin {
  width: min(100%, 1100px);
}

.brand {
  text-align: center;
  margin-bottom: 1.25rem;
}

.brand--compact {
  text-align: left;
}

.brand__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand__logo {
  display: block;
  width: auto;
  max-width: min(46vw, 170px);
  height: 52px;
  object-fit: contain;
}

.brand__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
}

.brand__title {
  margin: 0.35rem 0 0.15rem;
  font-family: var(--display);
  font-size: clamp(2rem, 8vw, 2.6rem);
  line-height: 1.1;
  color: var(--teal-dark);
  font-weight: 700;
}

.brand__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.info,
.form,
.success,
.ticket {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info {
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.info p {
  margin: 0.35rem 0;
}

.info__address,
.info__note {
  color: var(--muted);
}

.info__slots {
  margin-top: 0.75rem !important;
  font-weight: 600;
  color: var(--teal);
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert--error {
  background: #fde8e8;
  color: var(--danger);
  border: 1px solid #f2c2c2;
}

.alert--warn {
  background: #fff4df;
  color: var(--warn);
  border: 1px solid #ecd2a0;
}

.form {
  padding: 1.15rem;
  display: grid;
  gap: 0.9rem;
}

.form__hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal-dark);
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  background: #fbfdfc;
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(31, 107, 92, 0.35);
  border-color: var(--teal);
  background: #fff;
}

.field-row {
  display: grid;
  gap: 0.9rem;
}

.field-row--compact {
  grid-template-columns: 100px 1fr;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--teal-dark);
}

.btn:active {
  transform: scale(0.98);
}

.btn--ghost {
  background: transparent;
  color: var(--teal-dark);
  border: 1px solid var(--line);
}

.btn--small {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.success {
  padding: 1.35rem 1.15rem 1.5rem;
  text-align: center;
}

.success__badge {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #e4f3ee;
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.success__title {
  margin: 0.85rem 0 0.35rem;
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--teal-dark);
}

.success__lead {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.ticket {
  text-align: left;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #f7fcfa, #fff);
}

.ticket__label {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  font-weight: 700;
}

.ticket__time {
  margin: 0.2rem 0;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1;
}

.ticket__date {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.ticket hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 0.85rem 0;
}

.ticket p {
  margin: 0.25rem 0;
}

.ticket__id {
  margin-top: 0.75rem !important;
  color: var(--muted);
  font-size: 0.9rem;
}

.checklist {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  text-align: left;
  color: var(--muted);
}

.checklist li {
  position: relative;
  padding-left: 1.2rem;
  margin: 0.4rem 0;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--teal);
}

.footer {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.footer p {
  margin: 0.25rem 0;
}

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-bar__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.slots {
  margin-bottom: 1rem;
}

.slots h2 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.slots__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}

.slots__list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.slots__list li.is-full {
  opacity: 0.55;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 720px;
}

.table th,
.table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.table th {
  background: #eaf4f0;
  color: var(--teal-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

@media (min-width: 640px) {
  .page {
    padding-top: 2rem;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .field-row--compact {
    grid-template-columns: 120px 1fr;
  }

  .brand__logo {
    height: 60px;
    max-width: 200px;
  }
}
