.modern-checkout-page {
  --checkout-bg: #071426;
  --checkout-panel: rgba(13, 24, 47, .78);
  --checkout-panel-soft: rgba(255, 255, 255, .08);
  --checkout-line: rgba(244, 211, 141, .25);
  --checkout-gold: #f4d38d;
  --checkout-purple: #4c2678;
  --checkout-text: #f8fbff;
  --checkout-muted: #b7c0d5;
  min-height: 100vh;
  color: var(--checkout-text);
  background:
    radial-gradient(circle at 12% 12%, rgba(128, 216, 255, .18), transparent 26%),
    radial-gradient(circle at 84% 8%, rgba(217, 164, 65, .2), transparent 28%),
    linear-gradient(135deg, #071426 0%, #29154a 56%, #060f20 100%);
}

.modern-checkout-page .checkout-hero {
  position: relative;
  padding: 44px 0 24px;
  overflow: hidden;
}

.modern-checkout-page .checkout-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .7) 0 1px, transparent 1.6px);
  background-size: 118px 118px;
  opacity: .22;
  pointer-events: none;
}

.modern-checkout-page .checkout-hero-inner,
.modern-checkout-page .checkout-section {
  position: relative;
  z-index: 1;
}

.modern-checkout-page .checkout-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--checkout-gold);
  font-weight: 700;
}

.modern-checkout-page .checkout-eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--checkout-gold);
}

.modern-checkout-page .checkout-title {
  margin: 12px 0 10px;
  color: #fff8df;
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
}

.modern-checkout-page .checkout-lead {
  max-width: 760px;
  margin: 0;
  color: var(--checkout-muted);
  line-height: 1.75;
}

.modern-checkout-page .checkout-section {
  padding: 18px 0 48px;
}

.modern-checkout-page .checkout-card,
.modern-checkout-page .checkout-summary,
.modern-checkout-page .checkout-form {
  border: 1px solid var(--checkout-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .055));
  box-shadow: 0 20px 52px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .09);
  backdrop-filter: blur(14px);
}

.modern-checkout-page .checkout-card,
.modern-checkout-page .checkout-summary,
.modern-checkout-page .checkout-form {
  padding: 20px;
}

.modern-checkout-page .checkout-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.modern-checkout-page .checkout-stepper__item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(244, 211, 141, .2);
  border-radius: 8px;
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .06);
}

.modern-checkout-page .checkout-stepper__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #1a1326;
  background: rgba(255, 255, 255, .72);
  font-weight: 900;
}

.modern-checkout-page .checkout-stepper__label {
  font-weight: 800;
}

.modern-checkout-page .checkout-stepper__item.is-active,
.modern-checkout-page .checkout-stepper__item.is-done {
  color: #fff8df;
  border-color: rgba(244, 211, 141, .48);
  background: rgba(244, 211, 141, .11);
}

.modern-checkout-page .checkout-stepper__item.is-active .checkout-stepper__mark,
.modern-checkout-page .checkout-stepper__item.is-done .checkout-stepper__mark {
  background: linear-gradient(135deg, #fff2bd, #d7a63b);
}

.modern-checkout-page .checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 18px;
  align-items: start;
}

.modern-checkout-page .checkout-layout--equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modern-checkout-page .checkout-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.modern-checkout-page .checkout-card__title,
.modern-checkout-page .checkout-summary__title {
  margin: 0;
  color: #fff8df;
  font-size: 1.35rem;
  font-weight: 900;
}

.modern-checkout-page .checkout-card__subtitle {
  margin: 4px 0 0;
  color: var(--checkout-muted);
}

.modern-checkout-page .checkout-items {
  display: grid;
  gap: 12px;
}

.modern-checkout-page .checkout-item {
  display: grid;
  grid-template-columns: auto minmax(180px, 1.4fr) repeat(4, minmax(88px, .65fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(3, 5, 20, .24);
}

.modern-checkout-page .checkout-item__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff8df;
  font-weight: 800;
}

.modern-checkout-page .checkout-item__check input {
  width: 18px;
  height: 18px;
  accent-color: #d7a63b;
}

.modern-checkout-page .checkout-item__phone {
  display: grid;
  gap: 4px;
  color: #fff;
  text-decoration: none;
}

.modern-checkout-page .checkout-item__phone strong {
  color: #fff8df;
  font-size: 1.45rem;
  font-weight: 900;
}

.modern-checkout-page .checkout-item__phone span,
.modern-checkout-page .checkout-metric span,
.modern-checkout-page .checkout-summary-row span {
  color: var(--checkout-muted);
}

.modern-checkout-page .checkout-metric {
  display: grid;
  gap: 2px;
}

.modern-checkout-page .checkout-metric strong {
  color: var(--checkout-gold);
}

.modern-checkout-page .checkout-network {
  max-width: 72px;
  max-height: 32px;
  object-fit: contain;
}

.modern-checkout-page .checkout-price {
  color: #fff8df;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: right;
}

.modern-checkout-page .checkout-summary {
  position: sticky;
  top: 18px;
}

.modern-checkout-page .checkout-summary-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.modern-checkout-page .checkout-summary-item,
.modern-checkout-page .checkout-summary-row,
.modern-checkout-page .checkout-customer-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.modern-checkout-page .checkout-summary-item {
  align-items: center;
}

.modern-checkout-page .checkout-summary-item strong,
.modern-checkout-page .checkout-summary-row strong {
  color: #fff8df;
}

.modern-checkout-page .checkout-summary-row.is-total {
  border-bottom: 0;
}

.modern-checkout-page .checkout-summary-row.is-total strong {
  color: var(--checkout-gold);
  font-size: 1.5rem;
  font-weight: 900;
}

.modern-checkout-page .checkout-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.modern-checkout-page .checkout-form-grid--single {
  grid-template-columns: 1fr;
}

.modern-checkout-page .checkout-field {
  display: grid;
  gap: 7px;
  color: #fff8df;
  font-weight: 800;
}

.modern-checkout-page .checkout-field--wide {
  grid-column: 1 / -1;
}

.modern-checkout-page .checkout-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  color: #fff;
  background: rgba(3, 5, 20, .52);
  outline: none;
}

.modern-checkout-page .checkout-input:focus {
  border-color: rgba(244, 211, 141, .74);
  box-shadow: 0 0 0 3px rgba(244, 211, 141, .15);
}

.modern-checkout-page .checkout-input:invalid {
  border-color: rgba(255, 118, 118, .48);
}

.modern-checkout-page .checkout-help {
  color: var(--checkout-muted);
  font-size: .9rem;
}

.modern-checkout-page .checkout-options {
  display: grid;
  gap: 12px;
}

.modern-checkout-page .checkout-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: rgba(3, 5, 20, .25);
  cursor: pointer;
}

.modern-checkout-page .checkout-option input {
  margin-top: 5px;
  accent-color: #d7a63b;
}

.modern-checkout-page .checkout-option strong {
  color: #fff8df;
}

.modern-checkout-page .checkout-option span {
  color: var(--checkout-muted);
}

.modern-checkout-page .checkout-option__price {
  color: var(--checkout-gold);
  font-weight: 900;
  white-space: nowrap;
}

.modern-checkout-page .checkout-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
}

.modern-checkout-page .checkout-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.modern-checkout-page .checkout-table th,
.modern-checkout-page .checkout-table td {
  padding: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  vertical-align: middle;
}

.modern-checkout-page .checkout-table th {
  color: var(--checkout-gold);
  font-weight: 900;
}

.modern-checkout-page .checkout-text-end {
  text-align: right;
}

.modern-checkout-page .checkout-text-center {
  text-align: center;
}

.modern-checkout-page .checkout-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.modern-checkout-page .checkout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.modern-checkout-page .checkout-btn--primary {
  color: #1a1326;
  background: linear-gradient(135deg, #fff2bd, #d7a63b);
  box-shadow: 0 0 24px rgba(244, 211, 141, .2);
}

.modern-checkout-page .checkout-btn--ghost {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.modern-checkout-page .checkout-btn--danger {
  color: #ffd6d6;
  background: rgba(255, 92, 92, .1);
}

.modern-checkout-page .checkout-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.modern-checkout-page .checkout-empty i {
  color: var(--checkout-gold);
  font-size: 3rem;
}

.modern-checkout-page .checkout-empty h2 {
  margin: 0;
  color: #fff8df;
  font-weight: 900;
}

.modern-checkout-page .checkout-note {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(244, 211, 141, .22);
  border-radius: 8px;
  color: var(--checkout-muted);
  background: rgba(244, 211, 141, .08);
  line-height: 1.7;
}

.modern-checkout-page .modern-checkout-loading {
  opacity: .68;
  pointer-events: none;
}

.modern-checkout-page .modern-checkout-loading .checkout-btn--primary::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 19, 38, .35);
  border-top-color: #1a1326;
  border-radius: 50%;
  animation: checkout-spin .8s linear infinite;
}

@keyframes checkout-spin {
  to {
    transform: rotate(360deg);
  }
}

.order-credit-page .order-credit-hero {
  padding-bottom: 18px;
}

.order-credit-page .order-credit-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.order-credit-page .order-credit-status-card {
  overflow: hidden;
}

.order-credit-page .order-credit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(244, 211, 141, .38);
  border-radius: 999px;
  color: #fff8df;
  background: rgba(244, 211, 141, .12);
  font-weight: 900;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.order-credit-page .container,
.order-credit-page .checkout-layout,
.order-credit-page .checkout-card,
.order-credit-page .checkout-summary,
.order-credit-page .checkout-table-wrap,
.order-credit-page .order-credit-form {
  min-width: 0;
  max-width: 100%;
}

.order-credit-page .order-credit-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.order-credit-page .order-credit-meta-grid > div {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(3, 5, 20, .24);
  min-width: 0;
}

.order-credit-page .order-credit-meta-grid span,
.order-credit-page .order-credit-customer span {
  color: var(--checkout-muted);
}

.order-credit-page .order-credit-meta-grid strong,
.order-credit-page .order-credit-customer strong {
  color: #fff8df;
  overflow-wrap: anywhere;
}

.order-credit-page .order-credit-customer {
  display: grid;
  gap: 2px;
}

.order-credit-page .checkout-customer-line,
.order-credit-page .checkout-summary-row {
  min-width: 0;
}

.order-credit-page .checkout-customer-line span,
.order-credit-page .checkout-customer-line strong,
.order-credit-page .checkout-summary-row span,
.order-credit-page .checkout-summary-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-credit-page .order-credit-print-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.order-credit-page .order-credit-print-head img {
  width: 200px;
  max-width: 48%;
  height: auto;
  object-fit: contain;
}

.order-credit-page .order-credit-print-head div {
  display: grid;
  gap: 4px;
  color: var(--checkout-muted);
  text-align: right;
}

.order-credit-page .order-credit-print-head strong {
  color: #fff8df;
  font-size: 1.25rem;
}

.order-credit-page .order-credit-phone {
  color: #fff8df;
  font-size: 1.25rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-credit-page .order-credit-network {
  width: 62px;
  max-height: 34px;
  object-fit: contain;
}

.order-credit-page .order-credit-network-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: var(--checkout-muted);
  background: rgba(255, 255, 255, .06);
}

.order-credit-page .order-credit-summary {
  align-self: start;
}

.order-credit-page .order-credit-actions {
  justify-content: stretch;
}

.order-credit-page .order-credit-actions .checkout-btn {
  width: 100%;
}

.order-credit-page img {
  max-width: 100%;
  height: auto;
}

body.modern-checkout-loading {
  cursor: progress;
}

@media (max-width: 1199.98px) {
  .modern-checkout-page .checkout-item {
    grid-template-columns: auto minmax(180px, 1fr) repeat(2, minmax(88px, .5fr));
  }

  .modern-checkout-page .checkout-item .checkout-metric:nth-of-type(4),
  .modern-checkout-page .checkout-price {
    grid-column: auto;
  }
}

@media (max-width: 991.98px) {
  .modern-checkout-page .checkout-layout,
  .modern-checkout-page .checkout-layout--equal {
    grid-template-columns: 1fr;
  }

  .modern-checkout-page .checkout-summary {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .modern-checkout-page .checkout-stepper {
    grid-template-columns: 1fr;
  }

  .modern-checkout-page .checkout-stepper__item {
    min-height: 48px;
  }

  .modern-checkout-page .checkout-form-grid {
    grid-template-columns: 1fr;
  }

  .modern-checkout-page .checkout-item {
    grid-template-columns: 1fr;
  }

  .modern-checkout-page .checkout-price,
  .modern-checkout-page .checkout-text-end {
    text-align: left;
  }

  .modern-checkout-page .checkout-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modern-checkout-page .checkout-btn {
    width: 100%;
  }

  .order-credit-page .order-credit-meta-grid {
    grid-template-columns: 1fr;
  }

  .order-credit-page .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .order-credit-page .checkout-card,
  .order-credit-page .checkout-summary,
  .order-credit-page .checkout-form {
    padding: 16px;
  }

  .order-credit-page .checkout-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-credit-page .checkout-customer-line,
  .order-credit-page .checkout-summary-row {
    display: grid;
    gap: 4px;
  }

  .order-credit-page .checkout-customer-line strong,
  .order-credit-page .checkout-summary-row strong {
    text-align: left;
  }

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

  .order-credit-page .order-credit-print-head img {
    max-width: 220px;
  }

  .order-credit-page .order-credit-print-head div {
    text-align: left;
  }

  .order-credit-page .checkout-table-wrap {
    overflow: visible;
    border: 0;
  }

  .order-credit-page .order-credit-table {
    display: block;
    min-width: 0;
  }

  .order-credit-page .order-credit-table thead {
    display: none;
  }

  .order-credit-page .order-credit-table tbody,
  .order-credit-page .order-credit-table tr,
  .order-credit-page .order-credit-table td {
    display: block;
    width: 100%;
  }

  .order-credit-page .order-credit-table tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(3, 5, 20, .24);
  }

  .order-credit-page .order-credit-table td {
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    text-align: left;
  }

  .order-credit-page .order-credit-table td:last-child {
    border-bottom: 0;
  }

  .order-credit-page .order-credit-table td:nth-child(1)::before {
    content: "สินค้า";
  }

  .order-credit-page .order-credit-table td:nth-child(2)::before {
    content: "เครือข่าย";
  }

  .order-credit-page .order-credit-table td:nth-child(3)::before {
    content: "รวม";
  }

  .order-credit-page .order-credit-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--checkout-muted);
    font-size: .85rem;
    font-weight: 800;
  }
}
