#tab4 {
  padding: 44px 4px 0;
}

#tab4[hidden] {
  display: none;
}

/* ─── QR Card ─── */
#tab4 .tab-four-qr-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  min-height: 260px;
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#tab4 .tab-four-qr-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.4), transparent);
}

#tab4 .tab-four-qr-card .tab-four-qr-canvas {
  width: min(200px, 65vw);
  aspect-ratio: 1;
  border: 3px solid rgba(0, 230, 118, 0.3);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(0, 230, 118, 0.06), 0 8px 24px rgba(0, 0, 0, 0.3);
  display: block;
}

#tab4 .tab-four-qr-card p {
  max-width: 300px;
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

/* ─── Timer ─── */
#tab4 .tab-four-timer {
  width: 140px;
  min-height: 34px;
  margin: 8px auto 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--ink);
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  justify-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  transition: border-color 300ms ease, color 300ms ease;
}

#tab4 .tab-four-timer .icon-timer {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  -webkit-mask: none;
  mask: none;
  position: relative;
}

#tab4 .tab-four-timer .icon-timer::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: #071210;
  -webkit-mask: url("../icons/timer.svg") center / contain no-repeat;
  mask: url("../icons/timer.svg") center / contain no-repeat;
}

#tab4 .tab-four-timer.danger {
  border-color: rgba(255, 61, 110, 0.3);
  color: var(--red);
}

#tab4 .tab-four-timer.danger .icon-timer {
  background: var(--red);
}

#tab4 .tab-four-timer.danger .icon-timer::before {
  background: #fff;
}

/* ─── Info Card ─── */
#tab4 .tab-four-info-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  padding: 20px 16px 16px;
  position: relative;
  overflow: hidden;
}

#tab4 .tab-four-info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.3), transparent);
}

#tab4 h2 {
  margin: 0 0 6px 4px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#tab4 .tab-four-copy-box {
  min-height: 64px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 48px 12px 14px;
  background: var(--bg-elevated);
  position: relative;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  overflow-wrap: anywhere;
  transition: border-color 150ms ease;
}

#tab4 .tab-four-copy-box:hover {
  border-color: rgba(0, 230, 118, 0.25);
}

#tab4 .tab-four-amount-box {
  min-height: 54px;
  margin-top: 4px;
  padding-right: 54px;
  font-size: 22px;
  font-weight: 700;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  justify-items: center;
  overflow-wrap: normal;
  color: var(--accent);
}

#tab4 .tab-four-info-card h2 + .tab-four-copy-box + h2 {
  margin-top: 18px;
}

#tab4 .tab-four-divider {
  width: 1.5px;
  height: 28px;
  background: var(--line);
}

#tab4 .tab-four-copy-button {
  width: 34px;
  height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 50%;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 8px;
  transition: color 120ms ease, background 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

#tab4 .tab-four-copy-button .icon {
  width: 22px;
  height: 22px;
  transition: background-color 150ms ease;
}

#tab4 .tab-four-copy-button:hover {
  color: var(--accent);
  background: var(--accent-faint);
}

#tab4 .tab-four-copy-button.copied {
  color: var(--accent);
}

#tab4 .tab-four-copy-button.copied .icon {
  background-color: currentColor;
}

/* ─── Action Buttons ─── */
#tab4 .tab-four-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

#tab4 .tab-four-done,
#tab4 .tab-four-cancel {
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  transition: transform 120ms ease, box-shadow 120ms ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

#tab4 .tab-four-done {
  background: var(--accent);
  color: #071210;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.25);
}

#tab4 .tab-four-cancel {
  background: rgba(255, 61, 110, 0.15);
  color: var(--red);
  border: 1.5px solid rgba(255, 61, 110, 0.25);
  box-shadow: none;
}

#tab4 .tab-four-done:active,
#tab4 .tab-four-cancel:active {
  transform: translateY(1px) scale(0.98);
}

#tab4 .tab-four-done::after,
#tab4 .tab-four-cancel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
}

/* ─── Toast ─── */
#tab4 .tab-four-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 200;
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  background: var(--bg-elevated);
  color: var(--accent);
  border: 1.5px solid rgba(0, 230, 118, 0.25);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

#tab4 .tab-four-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 360px) {
  #tab4 { padding-right: 0; padding-left: 0; }
  #tab4 .tab-four-copy-box { font-size: 12px; }
  #tab4 .tab-four-done, #tab4 .tab-four-cancel { font-size: 15px; }
}
