/* Ticket purchase + admin + door validation pages */

.tickets-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(239, 91, 22, 0.12), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(245, 166, 35, 0.14), transparent 30%),
    linear-gradient(180deg, #fff8ef 0%, #f5e4cf 100%);
  color: var(--ink);
}

.tickets-topbar {
  padding: 18px 0;
  background: linear-gradient(180deg, rgba(31, 8, 3, 0.92), rgba(31, 8, 3, 0.72));
}

.tickets-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tickets-topbar .text-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.tickets-shell {
  width: min(640px, calc(100% - 40px));
  margin: 48px auto 80px;
  padding: 36px 28px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.tickets-shell.admin-wide {
  width: min(1100px, calc(100% - 32px));
}

.tickets-shell h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 12px;
}

.tickets-shell h1 span {
  color: var(--orange-deep);
}

.tickets-shell .lead {
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.ticket-price-line {
  margin: -4px 0 14px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.ticket-price-line strong {
  color: var(--orange-deep);
  font-size: 1.25rem;
}

.charity-impact {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(215, 139, 23, 0.35);
  background:
    linear-gradient(135deg, rgba(239, 91, 22, 0.08), transparent 55%),
    linear-gradient(180deg, #fff8ef, #f8ead8);
}

.charity-impact-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
}

.charity-impact-title {
  margin: 0 0 6px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.charity-impact-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.price-box .price-donate {
  color: var(--orange-deep);
  font-weight: 600;
}

.price-box .price-donate strong {
  color: var(--orange-deep);
}

.buy-form label {
  display: block;
  font-weight: 600;
  margin: 16px 0 8px;
}

.buy-form input,
.buy-form select,
.door-form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(70, 29, 15, 0.2);
  border-radius: 12px;
  background: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid > div label {
  margin-top: 0;
}

.price-box {
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8ef, #f8ead8);
  border: 1px solid var(--line);
}

.price-box > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  color: var(--ink-soft);
}

.price-box .price-total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.05rem;
}

.buy-form .button {
  width: 100%;
  border: 0;
  margin-top: 8px;
}

.fineprint {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 14px 0 0;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.tickets-help {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tickets-help ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.tickets-help li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.tickets-help a {
  color: var(--orange-deep);
  font-weight: 600;
}

.status-pill {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.status-valid { background: #e4f6e8; color: #146c2e; }
.status-used { background: #f3e7d8; color: #7a4a16; }
.status-cancelled { background: #fde4e4; color: #9b1c1c; }

.ticket-meta {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.ticket-meta > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
}

.ticket-meta dt {
  font-weight: 600;
  color: var(--ink-soft);
}

.ticket-meta dd {
  margin: 0;
}

.ticket-meta .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.door-form {
  margin-top: 24px;
}

.door-form .button {
  width: 100%;
  margin-top: 14px;
  border: 0;
}

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 14px 0;
}

.flash-ok { background: #e4f6e8; color: #146c2e; }
.flash-err { background: #fde4e4; color: #9b1c1c; }

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
}

.admin-actions .button {
  text-decoration: none;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 10px;
}

.admin-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.admin-filter span {
  min-width: 1.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.admin-filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.admin-filter.is-active span {
  color: #f5a623;
}

.admin-filter-note {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table th {
  color: var(--ink-soft);
  font-weight: 600;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .ticket-meta > div { grid-template-columns: 1fr; gap: 2px; }
  .tickets-shell { margin-top: 28px; padding: 28px 20px; }
  .charity-impact { align-items: flex-start; }
  .charity-impact-logo { width: 56px; height: 56px; }
}
