:root {
  --brand-900: #663300;
  --brand-700: #945E28;
  --brand-500: #C99933;
  --brand-100: #FFFFCC;
  --ink-900: #4a2500;
  --ink-700: #6d3f15;
  --bg-soft: #fff9e8;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 12px 30px rgba(102, 51, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink-900);
  background: linear-gradient(145deg, #fffdf5 0%, #fff7df 45%, #fffdf2 100%);
  min-height: 100vh;
  position: relative;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(201, 153, 51, 0.14) 0 12%, transparent 12% 100%),
    radial-gradient(circle at 90% 85%, rgba(148, 94, 40, 0.12) 0 10%, transparent 10% 100%),
    repeating-linear-gradient(
      135deg,
      rgba(102, 51, 0, 0.03) 0,
      rgba(102, 51, 0, 0.03) 2px,
      transparent 2px,
      transparent 12px
    );
}

.brand-header,
.brand-footer {
  background: rgba(255, 255, 204, 0.65);
  border-bottom: 1px solid rgba(102, 51, 0, 0.12);
}

.brand-footer {
  border-top: 1px solid rgba(102, 51, 0, 0.12);
  border-bottom: 0;
}

.brand-logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: auto;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
}

.brand-caption {
  font-weight: 600;
  color: var(--ink-700);
}

.flow-section {
  display: none;
  animation: softFade 0.35s ease;
}

.active-section {
  display: block;
}

@keyframes softFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-card,
.section-card,
.featured-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(102, 51, 0, 0.16);
  box-shadow: var(--shadow-soft);
  background: rgba(255, 255, 255, 0.88);
}

.hero-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 1.5rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(201, 153, 51, 0.2);
  color: var(--ink-700);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.hero-title {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  margin-bottom: 0.35rem;
  color: var(--brand-900);
  font-weight: 700;
}

.hero-tagline {
  color: var(--ink-700);
  font-size: 1.05rem;
}

.hero-intro {
  max-width: 820px;
}

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

.meta-item {
  background: var(--bg-soft);
  border: 1px solid rgba(102, 51, 0, 0.15);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.meta-item h6 {
  margin-bottom: 0.2rem;
  color: var(--ink-700);
}

.meta-item p {
  margin-bottom: 0;
  font-weight: 600;
}

.featured-card {
  overflow: hidden;
  max-width: 1024px;
}

.featured-image {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}

.section-card {
  padding: clamp(1.25rem, 2.8vw, 2rem);
  margin-top: 1.5rem;
  max-width: 1024px;
}

.section-head h2 {
  color: var(--brand-900);
  margin-bottom: 0.2rem;
  font-weight: 700;
}

.section-head p {
  color: var(--ink-700);
  margin-bottom: 1.1rem;
}

.form-label {
  font-weight: 600;
  color: var(--ink-900);
}

.form-control,
.form-select,
textarea.form-control {
  border-color: rgba(102, 51, 0, 0.3);
  border-radius: 10px;
  background: #fffdf4;
  color: var(--ink-900);
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: var(--brand-700);
  box-shadow: 0 0 0 0.2rem rgba(148, 94, 40, 0.2);
  background: #fff;
}

.invalid-feedback {
  font-size: 0.85rem;
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 0.6rem 1.15rem;
}

.btn-brand {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
}

.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  background: linear-gradient(135deg, #5a2c00, #814f20);
}

.btn-outline-brand {
  border: 1px solid var(--brand-700);
  color: var(--brand-900);
  background: rgba(255, 255, 255, 0.7);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
  background: var(--bg-soft);
  color: var(--brand-900);
  border-color: var(--brand-900);
}

.summary-card {
  border: 1px solid rgba(102, 51, 0, 0.18);
  border-radius: var(--radius-md);
  background: #fffdf3;
  padding: 1rem;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-list li {
  border-bottom: 1px dashed rgba(102, 51, 0, 0.18);
  padding: 0.55rem 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-list li:last-child {
  border-bottom: 0;
}

.summary-list span:first-child {
  color: var(--ink-700);
}

.summary-list span:last-child {
  text-align: right;
  font-weight: 600;
}

.amount-tag {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(201, 153, 51, 0.2);
  font-weight: 700;
  color: var(--brand-900);
}

.qr-placeholder {
  border-radius: 12px;
  border: 1px solid rgba(102, 51, 0, 0.18);
}

.upi-apps {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.upi-apps span {
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(102, 51, 0, 0.22);
  background: #fff;
}

.small-note {
  color: var(--ink-700);
  font-size: 0.92rem;
}

.success-card {
  max-width: 760px;
}

.success-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 2rem;
  color: var(--brand-900);
  border: 2px solid var(--brand-700);
  background: rgba(201, 153, 51, 0.14);
}

.ref-line {
  font-weight: 600;
  color: var(--ink-700);
}

.event-ticket {
  border: 2px dashed rgba(102, 51, 0, 0.42);
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf6, #fff9e7);
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.event-ticket::before,
.event-ticket::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  background: #fff7df;
  border: 2px solid rgba(102, 51, 0, 0.22);
  border-radius: 50%;
  top: 48%;
  transform: translateY(-50%);
}

.event-ticket::before {
  left: -14px;
}

.event-ticket::after {
  right: -14px;
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(102, 51, 0, 0.16);
  margin-bottom: 1rem;
}

.ticket-header h3 {
  color: var(--brand-900);
  font-weight: 700;
}

.ticket-logos {
  display: flex;
  gap:100px;
}

.ticket-logos img {
  width: auto;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}

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

.ticket-info-grid div {
  background: #fff;
  border: 1px solid rgba(102, 51, 0, 0.15);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}

.ticket-info-grid strong {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-700);
  margin-bottom: 0.2rem;
}

.ticket-info-grid span {
  font-weight: 600;
  word-break: break-word;
}

.ticket-qr-wrap {
  height: 100%;
  border: 1px solid rgba(102, 51, 0, 0.15);
  border-radius: 12px;
  padding: 0.65rem;
  background: #fff;
  text-align: center;
}

.ticket-qr-wrap img {
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.ticket-qr-wrap small {
  color: var(--ink-700);
}

.ticket-note {
  border-top: 1px dashed rgba(102, 51, 0, 0.2);
  margin-top: 1rem;
  padding-top: 0.8rem;
  color: var(--ink-700);
  font-size: 0.88rem;
}

.event-ticket.pdf-exporting {
  box-shadow: none !important;
}

.swal2-popup {
  border-radius: 16px;
  border: 1px solid rgba(102, 51, 0, 0.15);
}

.swal2-confirm.swal2-styled {
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
}

.swal2-cancel.swal2-styled {
  background: #b48b5f;
}

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

@media (max-width: 767px) {
  .event-meta-grid,
  .ticket-info-grid {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: auto;
    height: 46px;
  }

  .brand-caption {
    font-size: 0.85rem;
  }

  .section-head {
    margin-bottom: 0.6rem;
  }

  .summary-list li {
    flex-direction: column;
    gap: 4px;
  }

  .summary-list span:last-child {
    text-align: left;
  }

  .ticket-logos img {
    width: auto;
    height: 50px;
  }
}

@media print {
  body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-ticket-mode * {
    visibility: hidden !important;
  }

  body.print-ticket-mode #eventTicket,
  body.print-ticket-mode #eventTicket * {
    visibility: visible !important;
  }

  body.print-ticket-mode #eventTicket {
    position: absolute !important;
    left: 50% !important;
    top: 8mm !important;
    transform: translateX(-50%) !important;
    width: min(190mm, calc(100vw - 12mm)) !important;
    max-width: 190mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-color: #663300 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.print-ticket-mode #eventTicket::before,
  body.print-ticket-mode #eventTicket::after {
    display: none !important;
  }
}
