* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, #ffe56f 0, transparent 28%),
    radial-gradient(circle at top right, #8ce8ff 0, transparent 25%),
    linear-gradient(180deg, #fff9e8, #f8fbff);
  color: #263238;
}

.page {
  width: min(1120px, 94%);
  margin: 0 auto;
  padding: 34px 0 50px;
}

.hero {
  text-align: center;
  padding: 28px 18px;
}

.logo-badge {
  width: 150px;
  height: 150px;
  margin: 0 auto 18px;
  border-radius: 36px;
  background: #ffffff;
  border: 6px solid #ffd33d;
  box-shadow: 0 14px 35px rgba(0,0,0,.12);
  display: grid;
  place-items: center;
  transform: rotate(-3deg);
}

.logo-text {
  color: #1455a2;
  font-weight: 900;
  font-size: 30px;
  line-height: .95;
  text-align: center;
}

.logo-text span {
  color: #f36b21;
  font-size: 22px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 58px);
  color: #1455a2;
}

.hero p {
  margin: 14px auto 0;
  font-size: 20px;
  max-width: 680px;
  color: #455a64;
}

.programs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 18px;
}

.program-card {
  min-height: 440px;
  border-radius: 34px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 18px 40px rgba(0,0,0,.14);
  border: 5px solid #fff;
  overflow: hidden;
  position: relative;
}

.program-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  bottom: -55px;
  left: -45px;
}

.program-card h2 {
  margin: 0;
  font-size: 30px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,.18);
}

.program-card p {
  font-size: 18px;
  color: rgba(255,255,255,.95);
  line-height: 1.7;
}

.program-card a {
  position: relative;
  z-index: 1;
  display: inline-block;
  text-align: center;
  background: #fff;
  color: #1455a2;
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  padding: 14px 18px;
  border-radius: 999px;
}

.yellow { background: linear-gradient(160deg, #ffc928, #ff8f1f); }
.blue   { background: linear-gradient(160deg, #28c7ff, #2868ff); }
.pink   { background: linear-gradient(160deg, #ff78bd, #9d54ff); }

@media (max-width: 850px) {
  .programs { grid-template-columns: 1fr; }
  .program-card { min-height: 300px; }
}

.main-logo {
  width: 145px;
  height: auto;
  display: block;
  margin: 0 auto 18px;
}

.form-card {
  max-width: 820px;
  margin: 0 auto;
  background: rgba(255,255,255,.92);
  border: 5px solid #fff;
  border-radius: 34px;
  padding: 34px;
  box-shadow: 0 18px 45px rgba(0,0,0,.14);
  text-align: right;
}

.form-card h1,
.form-card h2 {
  text-align: center;
  color: #1455a2;
  margin: 8px 0;
}

.info-box {
  background: #fff7d6;
  border: 2px dashed #ffc928;
  border-radius: 22px;
  padding: 16px 22px;
  margin: 24px 0;
  line-height: 1.9;
}

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

.form-card label {
  font-weight: 800;
  color: #263238;
}

.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  border: 2px solid #dfe7ef;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 17px;
  background: #fff;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: none;
  border-color: #28c7ff;
  box-shadow: 0 0 0 4px rgba(40,199,255,.18);
}

.terms {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f3fbff;
  border-radius: 16px;
  padding: 14px;
}

.terms input {
  width: auto;
}

.kids-note {
  background: #f8f9fb;
  color: #607d8b;
  border-radius: 16px;
  padding: 14px;
}

.form-card button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(160deg, #ffc928, #ff8f1f);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  padding: 16px 24px;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(255,143,31,.28);
}

.form-card button:hover {
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .form-card {
    padding: 22px;
  }
}

.terms-box {
  background: #fff;
  border: 2px solid #edf1f5;
  border-radius: 18px;
  padding: 16px 18px;
  max-height: 170px;
  overflow-y: auto;
  line-height: 1.9;
}

.terms-box h3 {
  margin: 0 0 10px;
  color: #1455a2;
}

.terms-box ul {
  margin: 0;
  padding-right: 22px;
}

.kids-fields {
  display: grid;
  gap: 18px;
}

.kid-card {
  background: #fffaf0;
  border: 2px dashed #ffc928;
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.kid-card h3 {
  margin: 0;
  color: #1455a2;
}

.payment-summary {
  background: linear-gradient(160deg, #f3fbff, #fff7d6);
  border: 2px solid #dfe7ef;
  border-radius: 22px;
  padding: 18px;
  line-height: 1.9;
}

.payment-summary h3 {
  margin: 0 0 8px;
  color: #1455a2;
}

.payment-summary p {
  margin: 6px 0;
}

.discount {
  color: #00843d;
  font-weight: 800;
}

.total-line {
  margin-top: 12px;
  background: #1455a2;
  color: #fff;
  border-radius: 16px;
  padding: 14px;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.pay-title {
  color: #1455a2;
  text-align: center;
  margin-top: 22px;
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}

.pay-option {
  cursor: pointer;
  background: #fff;
  border: 2px solid #dfe7ef;
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 10px;
  place-items: center;
}

.pay-option input {
  width: auto;
}

.pay-option img {
  max-width: 130px;
  max-height: 55px;
  object-fit: contain;
}

.pay-option span {
  font-weight: 900;
  color: #1455a2;
}

@media (max-width: 700px) {
  .payment-methods {
    grid-template-columns: 1fr;
  }
}

.payment-methods {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.pay-option {
  min-height: 120px;
  border: 3px solid #e4edf5;
  transition: .15s ease;
}

.pay-option:has(input:checked) {
  border-color: #1455a2;
  background: #f3fbff;
  box-shadow: 0 8px 22px rgba(20,85,162,.14);
}

.pay-option input {
  margin: 0;
}

.pay-option img {
  max-width: 95px !important;
  max-height: 45px !important;
}

.pay-option span {
  font-size: 16px;
}

.pay-form button {
  margin-top: 8px;
}

.alert-box {
  background: #fff0f0;
  color: #b00020;
  border: 2px solid #ffc7c7;
  border-radius: 18px;
  padding: 14px 18px;
  margin: 18px 0;
  font-weight: 900;
  text-align: center;
}

.receipt-summary {
  position: relative;
  min-height: 310px;
}

.receipt-qr {
  position: absolute;
  left: 28px;
  top: 42px;
  width: 190px;
  text-align: center;
  background: #fff;
  border: 2px dashed #ffc928;
  border-radius: 20px;
  padding: 12px;
}

.receipt-qr img {
  width: 150px;
  height: 150px;
  display: block;
  margin: 0 auto 8px;
}

.receipt-qr div {
  color: #607d8b;
  font-weight: 800;
}

.receipt-qr strong {
  color: #1455a2;
  font-size: 15px;
}

@media (max-width: 700px) {
  .receipt-qr {
    position: static;
    margin: 0 auto 18px;
  }
}

.receipt-page .kid-card {
  min-height: auto;
  padding: 16px 22px;
  gap: 4px;
}

.receipt-page .kid-card p {
  margin: 6px 0;
  line-height: 1.45;
}

.receipt-page .kids-fields {
  gap: 14px;
}

.summary-page .kid-card {
  min-height: auto;
  padding: 14px 20px;
  gap: 3px;
}

.summary-page .kid-card p {
  margin: 5px 0;
  line-height: 1.4;
}

.summary-page .kids-fields {
  gap: 12px;
}

.receipt-page .logo {
  max-width: 130px;
}

.receipt-summary {
  min-height: auto;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  align-items: start;
}

.receipt-qr {
  position: static;
  width: 165px;
  padding: 10px;
  align-self: start;
}

.receipt-qr img {
  width: 130px;
  height: 130px;
}

.receipt-qr div {
  display: none;
}

.receipt-qr strong {
  font-size: 14px;
}

.receipt-summary .total-box {
  grid-column: 1 / -1;
}

@media (max-width: 700px) {
  .receipt-summary {
    display: block;
  }
}

/* restore receipt layout after bad grid override */
.receipt-summary {
  position: relative !important;
  min-height: 310px !important;
  display: block !important;
}

.receipt-qr {
  position: absolute !important;
  left: 28px !important;
  top: 42px !important;
  width: 190px !important;
  text-align: center !important;
  background: #fff !important;
  border: 2px dashed #ffc928 !important;
  border-radius: 20px !important;
  padding: 12px !important;
}

.receipt-qr img {
  width: 150px !important;
  height: 150px !important;
  display: block !important;
  margin: 0 auto 8px !important;
}

.receipt-qr div {
  display: none !important;
}

.receipt-qr strong {
  display: none !important;
}

.receipt-summary .total-box {
  grid-column: auto !important;
}

@media (max-width: 700px) {
  .receipt-qr {
    position: static !important;
    margin: 0 auto 18px !important;
  }
}

.admin-page .form-card {
  max-width: 1250px;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0;
}

.admin-cards div {
  background: linear-gradient(135deg, #fff7d7, #eefaff);
  border: 1px solid #dce8f2;
  border-radius: 20px;
  padding: 18px;
}

.admin-cards b {
  display: block;
  color: #455a64;
}

.admin-cards strong {
  display: block;
  color: #1455a2;
  font-size: 26px;
  margin-top: 8px;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e6eef5;
  text-align: right;
  white-space: nowrap;
}

.admin-table th {
  background: #1455a2;
  color: #fff;
}

.admin-table tr:hover td {
  background: #fff8e1;
}

.admin-page .logo {
  max-width: 120px !important;
  height: auto !important;
}

.admin-page h1 {
  margin-top: 8px;
}

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

.admin-table td:nth-child(5) {
  white-space: normal;
  min-width: 320px;
  line-height: 1.8;
}

.admin-page .form-card {
  max-width: 1450px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
}

.admin-table td:nth-child(5) {
  min-width: 460px;
}

.admin-kid-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px 12px;
  align-items: center;
  background: linear-gradient(135deg, #fff9df, #f3fbff);
  border: 1px solid #dfeaf3;
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(20, 85, 162, .07);
}

.kid-badge {
  grid-row: span 3;
  background: #1455a2;
  color: #fff;
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  font-weight: 900;
}

.kid-name {
  font-weight: 900;
  color: #123;
  font-size: 15px;
}

.kid-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kid-meta span,
.kid-health {
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.kid-health {
  display: inline-block;
  border-radius: 12px;
  color: #455a64;
}

/* cleaner admin kids layout */
.admin-table td:nth-child(5) {
  min-width: 560px !important;
  white-space: normal !important;
}

.admin-kid-card {
  display: grid !important;
  grid-template-columns: 72px 1fr !important;
  grid-template-areas:
    "badge name"
    "badge meta"
    "badge health" !important;
  gap: 7px 14px !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 0 10px 0 !important;
  padding: 12px 14px !important;
  border-radius: 18px !important;
}

.kid-badge {
  grid-area: badge !important;
  min-height: 72px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.kid-name {
  grid-area: name !important;
  text-align: right !important;
  font-size: 15px !important;
}

.kid-meta {
  grid-area: meta !important;
  justify-content: flex-start !important;
  direction: rtl !important;
}

.kid-health {
  grid-area: health !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 12px !important;
  text-align: right !important;
}

.admin-kid-card {
  grid-template-columns: 34px 1fr !important;
}

.kid-badge {
  min-height: auto !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.kid-badge::before {
  content: "";
}

.kid-badge {
  color: transparent !important;
}

.kid-badge::after {
  content: attr(data-num);
  color: #fff;
}

/* final clean admin child badge alignment */
.admin-kid-card {
  display: grid !important;
  grid-template-columns: 32px 1fr !important;
  grid-template-areas:
    "badge name"
    "badge meta"
    "badge health" !important;
  align-items: start !important;
}

.kid-badge {
  grid-area: badge !important;
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #1f5aa8 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 0 !important;
  align-self: start !important;
  margin-top: 2px !important;
}

.kid-badge::before,
.kid-badge::after {
  content: none !important;
}

.kid-name {
  text-align: right !important;
  margin-bottom: 6px !important;
}

.kid-meta {
  justify-content: flex-end !important;
  text-align: right !important;
}

.kid-health {
  text-align: right !important;
}

.table-wrap,
.admin-table {
  display: none !important;
}

.orders-list {
  display: grid;
  gap: 18px;
}

.order-card {
  background: #fff;
  border: 1px solid #dfeaf3;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(20,85,162,.08);
}

.order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #edf3f8;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.order-label,
.order-grid span {
  display: block;
  color: #607d8b;
  font-size: 13px;
  font-weight: 800;
}

.order-head strong {
  color: #1455a2;
  font-size: 20px;
}

.receipt-link {
  background: #1455a2;
  color: #fff;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.order-grid div {
  background: linear-gradient(135deg, #fff9df, #f3fbff);
  border: 1px solid #e5eef6;
  border-radius: 16px;
  padding: 10px 12px;
}

.order-grid b {
  color: #123;
  font-size: 15px;
}

.order-kids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.admin-kid-card {
  margin: 0 !important;
  min-height: auto !important;
}

@media (max-width: 850px) {
  .admin-page .form-card {
    padding: 18px !important;
  }

  .admin-cards,
  .order-grid {
    grid-template-columns: 1fr !important;
  }

  .order-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-head strong {
    font-size: 17px;
  }

  .order-kids {
    grid-template-columns: 1fr;
  }
}

.poster-card {
  padding: 0 !important;
  overflow: hidden;
  background: #fff !important;
}

.poster-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  object-position: top;
  display: block;
}

.poster-card div {
  padding: 18px 22px 8px;
}

.poster-card a {
  margin: 0 22px 22px;
}

.coming-soon {
  opacity: .75;
  pointer-events: none;
}

.active-program {
  transform: scale(1.05);
  border: 4px solid #e95da9;
  box-shadow: 0 12px 35px rgba(233,93,169,.25);
}

.poster-card img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: top;
  display: block;
}

.program-content {
  padding: 18px;
}

.program-content h2 {
  color: #c9367e;
}

.coming-soon {
  opacity: .7;
  pointer-events: none;
}

/* landing cards clean reset */
.programs {
  align-items: stretch !important;
}

.program-card,
.poster-card {
  width: 320px !important;
  height: 560px !important;
  min-height: 560px !important;
  padding: 28px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transform: none !important;
}

.poster-card {
  padding: 14px !important;
  background: #fff !important;
}

.poster-card img {
  width: 100% !important;
  height: 390px !important;
  object-fit: contain !important;
  object-position: top center !important;
  border-radius: 18px !important;
  background: #fff4f8 !important;
}

.poster-card .program-content {
  padding: 10px 6px 0 !important;
}

.poster-card .program-content h2 {
  font-size: 22px !important;
  line-height: 1.25 !important;
  margin: 0 0 6px !important;
}

.poster-card .program-content p {
  display: none !important;
}

.program-card a,
.poster-card a,
.coming-soon {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.82) !important;
  color: #1455a2 !important;
  text-align: center !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

.active-program {
  border: 4px solid #e95da9 !important;
  box-shadow: 0 12px 35px rgba(233,93,169,.25) !important;
}

@media (max-width: 900px) {
  .program-card,
  .poster-card {
    width: 100% !important;
    max-width: 360px !important;
  }
}

/* final poster card fix */
.poster-card {
  padding: 14px !important;
}

.poster-card img {
  flex: 1 !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: fill !important;
  border-radius: 18px !important;
}

.poster-card .program-content {
  display: none !important;
}

.poster-card a {
  margin-top: 12px !important;
}

/* poster overlay button fix */
.poster-card {
  position: relative !important;
  overflow: hidden !important;
}

.poster-card img {
  height: 100% !important;
  width: 100% !important;
  object-fit: fill !important;
}

.poster-card a {
  position: absolute !important;
  left: 28px !important;
  right: 28px !important;
  bottom: 26px !important;
  width: auto !important;
  margin: 0 !important;
  background: rgba(255,255,255,.78) !important;
  backdrop-filter: blur(3px);
  z-index: 5 !important;
}
