/* สไตล์รับชำระ — สอดคล้อง mobile.vncmobile.com/payment */
:root {
  --pay-primary: #dc2626;
  --pay-accent: #b91c1c;
  --pay-border: #fecdd3;
  --pay-bg: #fff1f2;
  --pay-muted: #64748b;
}

.pay-page { padding: 0 0 5.5rem; }
.pay-page.has-bottom-bar { padding-bottom: 7.5rem; }

.pay-page-head {
  text-align: center;
  margin-bottom: 12px;
}
.pay-page-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
.pay-page-head p {
  margin: 4px 0 0;
  font-size: 0.76rem;
  color: var(--pay-muted);
}

.pay-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.pay-step { opacity: 0.42; transition: opacity 0.25s ease; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pay-step.active { opacity: 1; }
.pay-step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: #f1f5f9; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  border: 1px solid #dbe3ed;
}
.pay-step.active .pay-step-num {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
  border-color: var(--pay-primary);
}
.pay-step-label { font-size: 9px; font-weight: 700; color: #475569; line-height: 1; }
.pay-step-line { width: 28px; height: 1px; background: #cbd5e1; flex-shrink: 0; }

.pay-card {
  background: #fff;
  border: 1px solid rgba(225, 29, 72, 0.2);
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(185, 28, 28, 0.08);
  margin-bottom: 14px;
  overflow: hidden;
}
.pay-card.pad { padding: 14px 16px; }

.pay-info-grid { display: grid; grid-template-columns: 1fr 1fr; }
.pay-info-cell {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pay-border);
  border-right: 1px solid var(--pay-border);
}
.pay-info-cell:nth-child(2n) { border-right: none; }
.pay-info-lbl {
  display: block; font-size: 0.68rem; color: var(--pay-muted);
  margin-bottom: 2px; text-transform: uppercase;
  letter-spacing: 0.4px; font-weight: 600;
}
.pay-info-val { display: block; font-size: 0.92rem; font-weight: 700; color: #0f172a; }
.pay-info-val.mono { font-family: ui-monospace, monospace; color: #991b1b; }

.pay-hero {
  padding: 12px 16px;
  background: linear-gradient(90deg, #b91c1c, #dc2626, #e11d48);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pay-hero-name { font-weight: 800; font-size: 0.88rem; }
.pay-hero-badge {
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  white-space: nowrap;
}

.pay-meta-strip {
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.72rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pay-meta-k { display: block; font-size: 0.62rem; color: var(--pay-muted); font-weight: 600; text-transform: uppercase; }
.pay-meta-v { font-weight: 700; color: #0f172a; margin-top: 2px; }

.pay-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: var(--pay-bg);
  border-top: 1px solid var(--pay-border);
}
@media (min-width: 520px) {
  .pay-summary-grid { grid-template-columns: repeat(4, 1fr); }
}
.pay-summary-item {
  text-align: center;
  padding: 10px 6px;
  border-right: 1px solid var(--pay-border);
  border-bottom: 1px solid rgba(244, 63, 94, 0.12);
}
.pay-summary-item:last-child { border-right: none; }
.pay-summary-lbl { display: block; font-size: 0.62rem; color: var(--pay-muted); margin-bottom: 2px; font-weight: 600; }
.pay-summary-val { font-size: 0.88rem; font-weight: 800; }
.pay-summary-val.green { color: #059669; }
.pay-summary-val.rose { color: #e11d48; }
.pay-summary-val.orange { color: #ea580c; }

.pay-breakdown-wrap {
  padding: 10px 12px;
  background: rgba(255, 241, 242, 0.85);
  border-top: 1px solid var(--pay-border);
}
.pay-breakdown-title {
  font-size: 0.62rem;
  font-weight: 800;
  color: #9f1239;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.pay-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
}
@media (min-width: 520px) {
  .pay-breakdown-grid { grid-template-columns: repeat(4, 1fr); }
}
.pay-bd-cell {
  text-align: center;
  padding: 10px 6px;
  border-right: 1px solid var(--pay-border);
  min-width: 0;
}
.pay-bd-cell:last-child { border-right: none; }

.pay-calc-title { font-weight: 800; font-size: 0.88rem; margin: 0 0 6px; color: #0f172a; }
.pay-calc-desc { font-size: 0.72rem; color: var(--pay-muted); line-height: 1.45; margin: 0 0 10px; }
.pay-calc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.pay-calc-row input {
  flex: 1 1 140px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
}
.pay-btn-calc {
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  background: #7c3aed;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}

.pay-tabs { display: flex; border-bottom: 2px solid #e2e8f0; background: #f8fafc; }
.pay-tab {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
}
.pay-tab.active { color: #6d28d9; border-bottom-color: #7c3aed; background: #fff; }

.pay-panel-toolbar {
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--pay-muted);
  font-weight: 600;
}
.pay-panel-scroll {
  max-height: min(42vh, 360px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.pay-due-row, .pv-pay-due-row {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
}
.pay-due-row:hover, .pv-pay-due-row:hover { background: #f8fafc; }
.pay-due-row-inner, .pv-pay-due-inner { display: flex; align-items: flex-start; gap: 10px; }
.pay-chk { width: 20px; height: 20px; margin-top: 2px; accent-color: #dc2626; flex-shrink: 0; cursor: pointer; }

.pay-badge, .pv-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
}
.pay-badge.partial, .pv-badge.partial { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.pay-badge.overdue, .pv-badge.overdue { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.pay-breakdown, .pv-pay-breakdown { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.pay-breakdown-item, .pv-pay-breakdown-item { font-size: 0.68rem; color: #6b7280; font-weight: 600; }

.pay-alloc-hint, .pv-pay-alloc-hint {
  width: 100%;
  padding: 6px 12px 10px;
  font-size: 0.65rem;
  line-height: 1.4;
  border-top: 1px solid #e9d5ff;
  background: linear-gradient(90deg, #f5f3ff, #f8fafc);
  color: #5b21b6;
  display: none;
}
.pay-alloc-hint.is-visible, .pv-pay-alloc-hint.is-visible { display: block; }

.pay-sched-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pay-sched-table, .pv-pay-sched-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.pay-sched-table thead th, .pv-pay-sched-table thead th {
  background: #f1f5f9;
  padding: 8px;
  text-align: left;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}
.pay-sched-table .r, .pv-pay-sched-table .r { text-align: right; }

.pay-pay-empty {
  text-align: center;
  padding: 28px 16px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
}

.pay-form-section {
  display: none;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fafafa;
}
.pay-form-section.is-open { display: block; }
.pay-form-head { font-weight: 800; font-size: 0.9rem; margin-bottom: 10px; }
.pay-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-form-group.full { grid-column: 1 / -1; }
.pay-form-label { display: block; font-size: 0.68rem; font-weight: 700; color: var(--pay-muted); margin-bottom: 4px; }
.pay-form-control {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
}
.pay-slip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.pay-form-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.pay-qr-section { display: none; }
.pay-qr-section.is-open { display: block; }
.pay-qr-head {
  padding: 16px;
  background: linear-gradient(135deg, #b91c1c, #dc2626, #e11d48);
  color: #fff;
  text-align: center;
}
.pay-qr-head h3 { margin: 6px 0 0; font-size: 1rem; font-weight: 800; }
.pay-qr-body { padding: 16px; text-align: center; }
.pay-qr-total { font-size: 1.75rem; font-weight: 900; color: #991b1b; margin-bottom: 4px; }
.pay-qr-desc { font-size: 0.78rem; color: var(--pay-muted); font-weight: 600; margin-bottom: 12px; }
.pay-qr-img-wrap { min-height: 200px; display: flex; align-items: center; justify-content: center; }
.pay-qr-img-wrap img { max-width: 260px; border-radius: 12px; border: 2px solid #e2e8f0; }
.pay-qr-warn {
  margin: 0 12px 10px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  font-size: 0.72rem;
  color: #92400e;
  line-height: 1.45;
  text-align: left;
}
.pay-qr-status {
  margin: 0 12px 12px;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}
.pay-qr-status.checking { background: #dbeafe; color: #1e40af; }
.pay-qr-status.success { background: #d1fae5; color: #065f46; }

.pay-bottom-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(52px + var(--safe-b, 0px));
  z-index: 90;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
  padding: 12px 14px;
}
.pay-bottom-bar.is-visible { display: block; }
.pay-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}
.pay-bottom-lbl { font-size: 0.68rem; color: var(--pay-muted); font-weight: 700; }
.pay-bottom-val { font-size: 1.35rem; font-weight: 900; color: #991b1b; }
.pay-bottom-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pay-btn {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.pay-btn-green { background: #059669; color: #fff; }
.pay-btn-red { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 4px 14px rgba(220,38,38,0.25); }
.pay-btn-outline { background: #fff; border: 1.5px solid #e2e8f0; color: #475569; }

.pay-list-card {
  margin-bottom: 10px;
  cursor: pointer;
}
.pay-list-card:active { opacity: 0.92; }
.pay-list-amt { font-size: 0.72rem; color: var(--pay-muted); margin-top: 4px; }

.pay-slip-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.55);
  padding: 16px;
  align-items: center;
  justify-content: center;
}
.pay-slip-modal.is-open { display: flex; }
.pay-slip-modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 100%;
  width: min(420px, 100%);
  max-height: 85vh;
  overflow: auto;
  border: 2px solid #e2e8f0;
}
.pay-slip-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
}

.pay-error-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.78rem;
  font-weight: 600;
}
.pay-error-banner[hidden] { display: none !important; }

.hidden { display: none !important; }

.bottom-tabs--4 {
  grid-template-columns: repeat(4, 1fr);
  padding-left: 4px;
  padding-right: 4px;
}
.bottom-tabs--4 button {
  font-size: 0.52rem;
  padding: 6px 3px;
}
.bottom-tabs--4 button .ico {
  font-size: 1.25rem;
}

.bottom-tabs--6 {
  grid-template-columns: repeat(6, 1fr);
  padding-left: 2px;
  padding-right: 2px;
}
.bottom-tabs--6 button {
  font-size: 0.46rem;
  padding: 5px 2px;
}
.bottom-tabs--6 button .ico {
  font-size: 1.1rem;
}

/* ─────────────────── ใบเสร็จ / จัดสรรชำระ ─────────────────── */
.pay-rcpt-head {
  font-size: 0.68rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pay-rcpt-head--alloc {
  margin-top: 10px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 12px;
}
.pay-rcpt-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}
.pay-rcpt-empty {
  text-align: center;
  padding: 22px 14px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
}
.pay-rcpt-empty--alloc { padding: 14px; font-size: 0.72rem; }

.pay-rcpt-list { display: flex; flex-direction: column; gap: 8px; }

.pay-rcpt-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 12px 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pay-rcpt-card:hover,
.pay-rcpt-card:active {
  background: #fafafa;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.pay-rcpt-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pay-rcpt-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  color: #6d28d9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.pay-rcpt-body { flex: 1; min-width: 0; }
.pay-rcpt-no {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  font-family: ui-monospace, monospace;
}
.pay-rcpt-date {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 1px;
}
.pay-rcpt-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.pay-rcpt-badge.ok { background: #dcfce7; color: #166534; }
.pay-rcpt-badge.pending { background: #dbeafe; color: #1e40af; }
.pay-rcpt-badge.rejected { background: #fee2e2; color: #991b1b; }
.pay-rcpt-badge.warn { background: #fef3c7; color: #92400e; }

.pay-rcpt-right {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.pay-rcpt-amt {
  font-size: 1rem;
  font-weight: 900;
  color: #991b1b;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.pay-rcpt-slip {
  border: 1px solid #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.pay-rcpt-slip:hover { background: #ede9fe; }

.pay-rcpt-lines {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pay-rcpt-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.7rem;
}
.pay-rcpt-line-l { color: #475569; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-rcpt-line-v { color: #0f172a; font-weight: 800; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ─────────────────── จัดสรรชำระ ─────────────────── */
.pay-alloc-note {
  margin: 0 0 8px;
  font-size: 0.66rem;
  color: #64748b;
  line-height: 1.45;
  padding: 0 4px;
}
.pay-alloc-note strong { color: #0f172a; }

.pay-alloc-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px;
}
.pay-alloc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.pay-alloc-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pay-alloc-partial {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.6rem;
  font-weight: 800;
  vertical-align: middle;
}
.pay-alloc-pay {
  flex-shrink: 0;
  font-size: 0.92rem;
  font-weight: 900;
  color: #047857;
  font-variant-numeric: tabular-nums;
}
.pay-alloc-meta {
  font-size: 0.66rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}
.pay-alloc-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 4px;
}
.pay-alloc-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2px 2px;
  min-width: 0;
}
.pay-alloc-k {
  font-size: 0.6rem;
  font-weight: 800;
  margin-bottom: 1px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pay-alloc-k.rose { color: #e11d48; }
.pay-alloc-k.violet { color: #7c3aed; }
.pay-alloc-k.dark { color: #0f172a; }
.pay-alloc-v {
  font-size: 0.74rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.pay-alloc-flow {
  font-size: 0.6rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}
.pay-alloc-foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.7rem;
  color: #475569;
  font-weight: 700;
  text-align: right;
}
.pay-alloc-foot-before {
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 700;
}
.pay-alloc-foot-after {
  color: #991b1b;
  font-weight: 900;
}

/* ─────────────────── Modal Notification (มือถือ) ─────────────────── */
.mfp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.mfp-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.mfp-modal {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28), 0 8px 24px rgba(0,0,0,0.16);
  overflow: hidden;
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.2s ease;
}
.mfp-modal-overlay.is-open .mfp-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.mfp-modal-head {
  padding: 22px 20px 14px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-bottom: 1px solid #f1f5f9;
}
.mfp-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 900;
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}
.mfp-modal-icon--success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.4);
  animation: mfpPop 0.32s cubic-bezier(0.2, 1.2, 0.3, 1.0) both;
}
.mfp-modal-icon--error {
  background: linear-gradient(135deg, #f43f5e, #dc2626);
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.4);
  animation: mfpShake 0.36s ease both;
}
.mfp-modal-icon--confirm {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4);
}
.mfp-modal-icon--warn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.4);
}
.mfp-modal-icon--info {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  font-style: italic;
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.4);
}
@keyframes mfpPop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes mfpShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.mfp-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}
.mfp-modal-body {
  padding: 14px 22px 6px;
  text-align: center;
}
.mfp-modal-msg {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  word-break: break-word;
}
.mfp-modal-sub {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 3px;
  line-height: 1.45;
}

.mfp-modal-actions {
  display: flex;
  gap: 8px;
  padding: 14px 20px 20px;
  flex-direction: row;
}
.mfp-modal-btn {
  flex: 1;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.15s ease;
}
.mfp-modal-btn:active { transform: scale(0.97); }
.mfp-modal-btn--ghost {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.mfp-modal-btn--ghost:hover { background: #e2e8f0; }
.mfp-modal-btn--primary {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  box-shadow: 0 6px 18px rgba(67, 56, 202, 0.32);
}
.mfp-modal-btn--success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.32);
  color: #fff;
}
.mfp-modal-btn--error {
  background: linear-gradient(135deg, #f43f5e, #dc2626);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.32);
  color: #fff;
}
.mfp-modal-btn--confirm {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  box-shadow: 0 6px 18px rgba(67, 56, 202, 0.32);
  color: #fff;
}
.mfp-modal-btn--info {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  box-shadow: 0 6px 18px rgba(3, 105, 161, 0.32);
  color: #fff;
}
.mfp-modal-btn--warn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.32);
  color: #fff;
}
.mfp-modal-btn:hover { filter: brightness(1.05); }

/* ─────────────────── Toast (มือถือ) ─────────────────── */
.mfp-toast {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  opacity: 0;
  z-index: 5500;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  font-family: inherit;
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.mfp-toast.is-open { opacity: 1; transform: translate(-50%, 0); }
.mfp-toast--success { background: linear-gradient(135deg, #10b981, #059669); }
.mfp-toast--error { background: linear-gradient(135deg, #f43f5e, #dc2626); }
.mfp-toast--warn { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1f1300; }
.mfp-toast--info { background: rgba(15, 23, 42, 0.92); }
