/* Payment confirm swipe — web prototype aligned with Flutter PaymentConfirmSwipeFlow */
:root {
  --psw-bg: #0f172a;
  --psw-card: #111827;
  --psw-confirm: #34d399;
  --psw-skip: #94a3b8;
  --psw-accent-debt: #22c55e;
  --psw-accent-sub: #f59e0b;
  --psw-accent-fixed: #f59e0b;
  --psw-font: 'Inter', system-ui, sans-serif;
}

.psw-page {
  min-height: 100vh;
  background: var(--psw-bg);
  color: #fff;
  font-family: var(--psw-font);
}

.psw-page .mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 15% 10%, rgba(52, 211, 153, 0.08), transparent 55%),
    radial-gradient(ellipse 45% 35% at 85% 15%, rgba(74, 251, 229, 0.06), transparent 50%),
    linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
}

.psw-shell {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.psw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.psw-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.psw-brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
}

.psw-brand-title {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.psw-brand-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.45);
}

.psw-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.psw-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 0.75rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.psw-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(52, 211, 153, 0.35);
}

.psw-btn--primary {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
}

.psw-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 960px) {
  .psw-layout {
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 2rem;
  }
}

.psw-notes {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  padding: 1.15rem 1.2rem;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.psw-notes h1 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.psw-notes p {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.psw-checklist {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.psw-checklist li {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  padding-left: 1.1rem;
  position: relative;
}

.psw-checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--psw-confirm);
}

.psw-log {
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 0.85rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.42);
  min-height: 3.5rem;
  line-height: 1.45;
}

.psw-log strong {
  color: rgba(255, 255, 255, 0.75);
}

.psw-stage-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.psw-phone {
  width: min(100%, 390px);
  border-radius: 2.4rem;
  padding: 0.65rem;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.psw-notch {
  width: 34%;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0.35rem auto 0.65rem;
}

.psw-screen {
  position: relative;
  border-radius: 1.85rem;
  overflow: hidden;
  min-height: 680px;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.psw-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  z-index: 0;
}

.psw-flow {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.75rem 0.85rem 1rem;
}

.psw-header {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.psw-header h2 {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.psw-icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.psw-icon-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.psw-subtitle {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.5rem;
}

.psw-stack-area {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0.25rem 0 0.5rem;
  min-height: 380px;
}

.psw-stack {
  position: relative;
  width: min(100%, 320px);
  height: 360px;
}

.psw-card {
  position: absolute;
  inset: 0;
  border-radius: 1.75rem;
  background: var(--psw-card);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.psw-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(15, 23, 42, 0.95));
  pointer-events: none;
}

.psw-card--behind {
  pointer-events: none;
  filter: saturate(0.85);
}

.psw-card-fill {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.08s linear;
}

.psw-card-body {
  position: relative;
  z-index: 1;
  padding: 1.35rem 1.25rem 1.1rem;
  text-align: center;
  transition: opacity 0.1s linear;
}

.psw-card-date {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}

.psw-card-avatar {
  width: 4rem;
  height: 4rem;
  margin: 0.85rem auto;
  border-radius: 1.1rem;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.psw-card-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.psw-card-amount {
  margin: 0.45rem 0 0.75rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.psw-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.psw-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.psw-card-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0.85rem 0 0.55rem;
}

.psw-card-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.4;
}

.psw-donut {
  position: absolute;
  top: 1rem;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.08s;
}

.psw-donut--left {
  right: 1rem;
}

.psw-donut--right {
  left: 1rem;
}

.psw-donut-ring {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: conic-gradient(#fff calc(var(--p, 0) * 1turn), rgba(255, 255, 255, 0.28) 0);
  display: grid;
  place-items: center;
}

.psw-donut-ring::after {
  content: '';
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.psw-donut-icon {
  position: absolute;
  font-size: 1rem;
  font-weight: 800;
}

.psw-donut-label {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.psw-footer {
  margin-top: auto;
}

.psw-toolbar {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.psw-progress {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
}

.psw-confirm-all {
  border: none;
  background: transparent;
  color: rgba(94, 234, 212, 0.9);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  justify-self: end;
}

.psw-confirm-all:disabled {
  opacity: 0.35;
  cursor: default;
}

.psw-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.psw-tile {
  position: relative;
  height: 5.5rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.psw-tile--confirm {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.12);
}

.psw-tile-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--fill, 0) * 100%);
  opacity: 0.85;
  pointer-events: none;
  transition: height 0.06s linear;
}

.psw-tile-icon {
  position: relative;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.1rem;
}

.psw-tile-label {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 700;
}

.psw-done {
  flex: 1;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 959px) {
  .psw-phone {
    width: min(100%, 360px);
  }

  .psw-screen {
    min-height: 640px;
  }
}

/* Landing embed */
.psw-landing {
  position: relative;
}

.psw-landing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 960px) {
  .psw-landing-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 2.5rem;
  }
}

.psw-landing-copy .psw-checklist {
  margin-bottom: 1.25rem;
}

.psw-landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.psw-landing .psw-log {
  border-top: none;
  padding-top: 0;
  min-height: 1.5rem;
  margin: 0;
}

.psw-landing .psw-phone {
  margin: 0 auto;
}

.psw-landing .psw-screen {
  min-height: 620px;
}

@media (max-width: 640px) {
  .psw-landing .psw-screen {
    min-height: 580px;
  }
}
