:root {
  --bg: #f1f6ff;
  --text: #10223c;
  --muted: #465a78;
  --card: rgba(255, 255, 255, 0.87);
  --stroke: rgba(40, 66, 102, 0.22);
  --accent: #6b63ff;
  --accent-2: #53d8f0;
  --accent-3: #a028cc;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Manrope, Segoe UI, sans-serif;
  background:
    radial-gradient(circle at 78% 10%, rgba(160, 40, 204, 0.18), transparent 36%),
    radial-gradient(circle at 8% 86%, rgba(83, 216, 240, 0.24), transparent 34%),
    linear-gradient(135deg, #d9f5ff 0%, #e7ebff 45%, #f2e9ff 100%);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(72, 96, 140, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(72, 96, 140, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

.bg-blur {
  position: fixed;
  pointer-events: none;
  width: 42vw;
  height: 42vw;
  border-radius: 100%;
  filter: blur(55px);
  opacity: 0.4;
}

.bg-blur.one {
  left: -10vw;
  top: 25vh;
  background: #53d8f0;
}

.bg-blur.two {
  right: -12vw;
  top: -4vh;
  background: #a028cc;
}

.wrap {
  width: min(980px, calc(100vw - 28px));
  margin: 28px auto 40px;
  display: grid;
  gap: 16px;
}

.card {
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: 0 22px 50px rgba(27, 40, 74, 0.18);
}

.hero {
  padding: 24px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(66, 102, 164, 0.2);
  box-shadow: 0 10px 24px rgba(44, 65, 110, 0.15);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.04;
}

.muted {
  color: var(--muted);
  margin: 10px 0 0;
}

.card-inset {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(83, 216, 240, 0.32);
  background: linear-gradient(120deg, rgba(83, 216, 240, 0.12), rgba(160, 40, 204, 0.09));
}

.promo p {
  margin: 0;
  line-height: 1.5;
}

.promo ul {
  margin: 10px 0;
  padding-left: 20px;
  color: #1f3154;
  display: grid;
  gap: 6px;
}

.shots {
  padding: 20px;
}

.shots h2 {
  margin: 0;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 24px;
}

.shots-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.shot-slot {
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  border: 1px dashed rgba(35, 72, 120, 0.34);
  background: linear-gradient(135deg, rgba(83, 216, 240, 0.16), rgba(160, 40, 204, 0.16));
  color: #1d3760;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-card {
  padding: 22px;
}

.grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(42, 74, 121, 0.26);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.9);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 99, 255, 0.2);
}

.hint-box {
  border-radius: 12px;
  border: 1px dashed rgba(35, 63, 104, 0.28);
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
}

.summary {
  border-radius: 14px;
  border: 1px solid rgba(107, 99, 255, 0.3);
  background: linear-gradient(120deg, rgba(83, 216, 240, 0.12), rgba(255, 255, 255, 0.84));
  padding: 14px;
  white-space: pre-line;
  font-size: 14px;
  margin-bottom: 14px;
}

.cta {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(95deg, #6b63ff, #53d8f0);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(87, 107, 221, 0.35);
}

.cta:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.required-star {
  color: #ff4d6a;
  margin-left: 2px;
  white-space: nowrap;
}

.notice {
  margin: 12px 0 0;
  min-height: 20px;
  font-size: 14px;
  color: var(--muted);
}

.notice.error {
  color: var(--danger);
}

.notice.success {
  color: #2f56dd;
}

.reveal {
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.delay-1 {
  animation-delay: 0.08s;
}

.delay-2 {
  animation-delay: 0.14s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .shots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shot-slot:last-child {
    grid-column: span 2;
  }

  .wrap {
    margin: 16px auto 26px;
  }

  .hero,
  .form-card {
    padding: 16px;
  }
}

/* Modal / overlay */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 40, 0.55);
  backdrop-filter: blur(6px);
  padding: 16px;
}

.overlay[hidden] {
  display: none;
}

.modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal h2 {
  margin: 0;
  font-family: "Space Grotesk", Manrope, sans-serif;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  background: rgba(83, 216, 240, 0.16);
  color: var(--text);
}

.modal-close:active {
  transform: scale(0.97);
}

.modal-table-wrap {
  overflow-x: auto;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.orders-table th,
.orders-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--stroke);
  white-space: nowrap;
}

.orders-table th {
  font-weight: 700;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.orders-table a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.orders-table a:hover {
  text-decoration: underline;
}

.pay-again-btn {
  margin-top: 6px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(107, 99, 255, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
  cursor: pointer;
}

.pay-again-btn:hover {
  background: rgba(107, 99, 255, 0.18);
}

.pay-again-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.st-active td:nth-child(3) { color: #1a8a3e; font-weight: 700; }
.st-pending td:nth-child(3) { color: #b08800; font-weight: 600; }
.st-error td:nth-child(3) { color: var(--danger); font-weight: 600; }
.st-expired td:nth-child(3) { color: var(--muted); }

.modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.orders-table-cards {
  display: none;
}

.cta-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.cta-secondary:hover {
  background: rgba(107, 99, 255, 0.08);
  box-shadow: none;
  transform: none;
}

@media (max-width: 860px) {
  .modal {
    padding: 16px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
  }
  .modal-head {
    flex-shrink: 0;
  }
  .modal-table-wrap {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-actions {
    flex-shrink: 0;
  }
  .orders-table,
  .orders-table thead {
    display: none;
  }
  .orders-table-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .order-card {
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.6);
    font-size: 13px;
    line-height: 1.6;
  }
  .order-card .oc-status { font-weight: 700; }
  .order-card.st-active .oc-status { color: #1a8a3e; }
  .order-card.st-pending .oc-status { color: #b08800; }
  .order-card.st-error .oc-status { color: var(--danger); }
  .order-card.st-expired .oc-status { color: var(--muted); }
  .order-card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
  }
  .pay-again-btn {
    width: 100%;
    margin-top: 10px;
  }
}
