:root {
  --bg: #06110f;
  --bg-soft: #0a1916;
  --card: rgba(12, 29, 25, .82);
  --card-strong: #0d201c;
  --line: rgba(136, 255, 209, .13);
  --line-strong: rgba(111, 255, 200, .28);
  --text: #f3faf7;
  --muted: #8ba69d;
  --green: #4df0ae;
  --green-strong: #17c981;
  --green-dark: #063724;
  --yellow: #f4c95d;
  --red: #ff7c83;
  --shadow: 0 24px 80px rgba(0, 0, 0, .32);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(6,17,15,.96), rgba(6,17,15,.98)),
    radial-gradient(circle at 15% 20%, #0f5137 0, transparent 32%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .15;
  background-image: linear-gradient(rgba(77,240,174,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(77,240,174,.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.ambient { position: fixed; border-radius: 50%; filter: blur(110px); pointer-events: none; opacity: .16; }
.ambient-one { width: 420px; height: 420px; background: #1ded95; top: -220px; right: -120px; }
.ambient-two { width: 330px; height: 330px; background: #18a67a; bottom: -200px; left: -100px; }

.site-header {
  position: relative;
  z-index: 10;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.site-header nav { display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 20px; font-weight: 850; letter-spacing: .08em; }
.brand > span:last-child > span { color: var(--green); }
.brand-large { font-size: 26px; }
.brand-mark { position: relative; width: 28px; height: 28px; transform: rotate(45deg); display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.brand-mark i { display: block; border: 2px solid var(--green); border-radius: 3px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--green); }
.nav-link { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; transition: color .2s; }
.nav-link:hover { color: var(--text); }
.logout-form { margin: 0; }
.nav-button { background: none; border: 0; padding: 0; cursor: pointer; }

.page-shell { position: relative; z-index: 1; max-width: 1240px; min-height: calc(100vh - 170px); margin: 0 auto; padding: 70px 24px; }
.site-footer { position: relative; z-index: 1; color: #607c73; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 26px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.footer-dot { color: var(--green); }

.hero-grid { min-height: 620px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(50px, 8vw, 110px); }
.hero-copy h1, .payment-heading h1, .section-heading h1, .auth-intro h1 { margin: 12px 0 20px; font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.055em; }
.hero-copy h1 em, .auth-intro h1 em { color: var(--green); font-style: normal; font-weight: 450; }
.lead { max-width: 580px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.eyebrow { margin: 0; color: var(--green); font-size: 11px; line-height: 1.2; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.environment-pill { width: max-content; display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 28px; border: 1px solid rgba(244,201,93,.25); border-radius: 999px; background: rgba(244,201,93,.07); color: #f5d987; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.environment-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 12px var(--yellow); }
.signal-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 40px; color: #78958b; font-size: 12px; font-weight: 650; }
.signal-row span { display: flex; align-items: center; gap: 7px; }
.signal-row i { width: 5px; height: 5px; background: var(--green); border-radius: 50%; }

.glass-card { background: linear-gradient(145deg, rgba(16,39,33,.88), rgba(9,25,21,.9)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.charge-card { padding: clamp(26px, 5vw, 46px); }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.card-heading h2, .login-card h2, .status-card h2, .detail-card h2, .timeline-card h2 { margin: 7px 0 0; font-size: 24px; letter-spacing: -.03em; }
.pix-glyph { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--green); background: rgba(77,240,174,.06); font-size: 22px; }
.stack-form { display: grid; gap: 24px; margin-top: 30px; }
.field { display: grid; gap: 9px; }
.field label { color: #b9ccc5; font-size: 13px; font-weight: 650; }
.text-input { width: 100%; border: 1px solid var(--line); border-radius: 14px; outline: none; background: rgba(3,15,12,.65); color: var(--text); padding: 15px 16px; transition: border-color .2s, box-shadow .2s, background .2s; }
.text-input::placeholder { color: #526c63; }
.text-input:focus { border-color: var(--green-strong); background: rgba(5,21,17,.9); box-shadow: 0 0 0 4px rgba(77,240,174,.08); }
.money-input { position: relative; }
.money-input > span { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--green); font-size: 18px; font-weight: 800; }
.money-input .text-input { padding-left: 57px; font-size: 30px; font-weight: 750; letter-spacing: -.03em; }
.field-help, .limit-note { margin: 0; color: #58736a; font-size: 11px; }
.field-error { color: #ff9a9f; font-size: 12px; }

.primary-button, .secondary-button { min-height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 850; font-size: 12px; letter-spacing: .12em; text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; }
.primary-button { border: 0; color: #052116; background: linear-gradient(135deg, #62f4bc, #2bdb99); box-shadow: 0 12px 30px rgba(43,219,153,.18); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(43,219,153,.26); }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.primary-button svg, .copy-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.secondary-button { border: 1px solid var(--line-strong); color: var(--green); background: rgba(77,240,174,.04); }
.secondary-button:hover { background: rgba(77,240,174,.09); }
.compact-button { min-height: 44px; padding: 0 20px; width: max-content; }
.limit-note { text-align: center; }

.flash-stack { position: fixed; z-index: 30; top: 24px; left: 50%; transform: translateX(-50%); width: min(92%, 520px); }
.flash { border: 1px solid rgba(255,124,131,.3); background: #31191b; color: #ffd7d9; border-radius: 12px; padding: 13px 16px; box-shadow: var(--shadow); font-size: 13px; }

.auth-page .page-shell { display: grid; place-items: center; min-height: calc(100vh - 80px); padding-top: 30px; padding-bottom: 30px; }
.auth-layout { width: min(1040px, 100%); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(45px, 9vw, 120px); }
.auth-intro .brand { margin-bottom: 70px; }
.auth-intro h1 { font-size: clamp(43px, 5vw, 67px); }
.login-card { padding: clamp(28px, 5vw, 46px); }
.security-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 24px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(77,240,174,.06); }
.security-icon svg { width: 26px; fill: none; stroke: var(--green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.secure-note { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 23px; color: #58736a; font-size: 11px; }
.secure-note span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.payment-layout { max-width: 1040px; margin: 0 auto; }
.payment-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 35px; }
.payment-heading h1 { font-size: clamp(37px, 5vw, 58px); margin-bottom: 0; }
.payment-heading .environment-pill { margin: 0; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--green); }
.payment-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 22px; }
.qr-card { padding: clamp(24px, 4vw, 38px); text-align: center; }
.amount-display > span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.amount-display strong { display: block; margin-top: 4px; font-size: 38px; letter-spacing: -.045em; }
.amount-display p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.qr-wrap { position: relative; width: min(100%, 350px); aspect-ratio: 1; display: grid; place-items: center; margin: 27px auto; padding: 22px; background: #fff; border-radius: 22px; }
.qr-wrap img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.scan-corners i { position: absolute; width: 30px; height: 30px; border-color: var(--green-strong); border-style: solid; }
.scan-corners i:nth-child(1) { top: -5px; left: -5px; border-width: 3px 0 0 3px; border-radius: 7px 0 0 0; }
.scan-corners i:nth-child(2) { top: -5px; right: -5px; border-width: 3px 3px 0 0; border-radius: 0 7px 0 0; }
.scan-corners i:nth-child(3) { bottom: -5px; left: -5px; border-width: 0 0 3px 3px; border-radius: 0 0 0 7px; }
.scan-corners i:nth-child(4) { bottom: -5px; right: -5px; border-width: 0 3px 3px 0; border-radius: 0 0 7px 0; }
.copy-feedback { min-height: 20px; margin: 8px 0 -10px; color: var(--green); font-size: 12px; }
.status-column { display: grid; align-content: start; gap: 18px; }
.status-card { padding: 40px 32px; text-align: center; }
.status-orb { position: relative; width: 88px; height: 88px; display: grid; place-items: center; margin: 0 auto 28px; border: 1px solid rgba(244,201,93,.35); border-radius: 50%; color: var(--yellow); background: rgba(244,201,93,.08); }
.pulse-ring { position: absolute; inset: -1px; border: 1px solid rgba(244,201,93,.38); border-radius: inherit; animation: pulse 2.2s ease-out infinite; }
.waiting-symbol { letter-spacing: 3px; font-weight: 900; transform: translateY(-3px); }
.paid-symbol { display: none; width: 42px; fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.status-card h2 { margin: 9px 0 10px; }
.status-description { min-height: 45px; margin: 0; color: var(--muted); font-size: 13px; }
.countdown { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.countdown strong { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; }
.technical-card { padding: 24px; }
.technical-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 10px 0; border-bottom: 1px solid rgba(136,255,209,.07); font-size: 12px; }
.technical-row span { color: var(--muted); flex-shrink: 0; }
.technical-row strong { max-width: 65%; text-align: right; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
.text-link { display: inline-block; margin-top: 18px; color: var(--green); font-size: 12px; text-decoration: none; }
.is-paid .status-orb { border-color: rgba(77,240,174,.38); background: rgba(77,240,174,.09); }
.is-paid .pulse-ring, .is-paid .waiting-symbol { display: none; }
.is-paid .paid-symbol { display: block; animation: check-in .45s cubic-bezier(.2,.9,.3,1.3); }
.is-paid .status-card { border-color: rgba(77,240,174,.26); box-shadow: 0 24px 80px rgba(12,155,99,.12); }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h1 { margin: 8px 0 0; font-size: clamp(34px, 5vw, 54px); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-chip { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; }
.filter-chip:hover, .filter-chip.active { color: var(--green); border-color: var(--line-strong); background: rgba(77,240,174,.06); }
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 930px; }
th { padding: 17px 18px; color: #69847b; font-size: 10px; letter-spacing: .12em; text-align: left; text-transform: uppercase; background: rgba(3,15,12,.38); }
td { padding: 17px 18px; border-top: 1px solid rgba(136,255,209,.07); color: #aec3bc; font-size: 12px; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(77,240,174,.025); }
.truncate-cell { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-link { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--green); text-decoration: none; }
.status-badge { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.status-paid { color: var(--green); background: rgba(77,240,174,.07); border-color: rgba(77,240,174,.2); }
.status-pending, .status-creating { color: var(--yellow); background: rgba(244,201,93,.07); border-color: rgba(244,201,93,.2); }
.status-failed { color: var(--red); background: rgba(255,124,131,.07); border-color: rgba(255,124,131,.2); }
.status-expired, .status-canceled, .status-refunded { color: #9db1aa; }
.empty-state { padding: 80px 20px; text-align: center; }
.empty-state > div { color: var(--green); font-size: 40px; }
.empty-state h2 { margin: 13px 0 5px; }
.empty-state p { margin: 0; color: var(--muted); }

.detail-page { max-width: 1020px; margin: 0 auto; }
.detail-heading { align-items: center; }
.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; }
.detail-card, .timeline-card { padding: clamp(24px, 4vw, 36px); }
.detail-card h2, .timeline-card h2 { margin: 0 0 24px; }
.detail-list { margin: 0 0 28px; }
.detail-list > div { display: grid; grid-template-columns: 145px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid rgba(136,255,209,.07); }
.detail-list dt { color: var(--muted); font-size: 12px; }
.detail-list dd { margin: 0; text-align: right; font-size: 12px; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 14px; padding-bottom: 30px; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; top: 15px; bottom: -1px; left: 6px; width: 1px; background: var(--line); }
.timeline li > span { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 3px; border: 2px solid #557067; border-radius: 50%; background: var(--card-strong); }
.timeline li.complete > span { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 4px rgba(77,240,174,.08); }
.timeline strong { display: block; font-size: 13px; }
.timeline time { color: var(--muted); font-size: 11px; }

@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(1.35); opacity: 0; } }
@keyframes check-in { from { opacity: 0; transform: scale(.45) rotate(-15deg); } to { opacity: 1; transform: scale(1) rotate(0); } }

@media (max-width: 860px) {
  .page-shell { padding-top: 48px; }
  .hero-grid, .auth-layout, .payment-grid, .detail-grid { grid-template-columns: 1fr; }
  .hero-grid { min-height: auto; gap: 42px; }
  .hero-copy { text-align: center; }
  .hero-copy .environment-pill, .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .signal-row { justify-content: center; }
  .auth-intro { text-align: center; }
  .auth-intro .brand { margin: 0 auto 38px; }
  .auth-intro .lead { margin-left: auto; margin-right: auto; }
  .status-column { grid-template-columns: 1fr 1fr; }
  .status-column > .secondary-button { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .site-header { padding: 19px 17px; }
  .site-header nav { gap: 14px; }
  .site-header .nav-link:not(.nav-button) { display: none; }
  .page-shell { padding: 38px 16px 56px; }
  .hero-copy h1, .auth-intro h1 { font-size: 43px; }
  .lead { font-size: 15px; }
  .signal-row { gap: 12px; }
  .charge-card { border-radius: 20px; }
  .auth-layout { gap: 34px; }
  .auth-intro .brand { margin-bottom: 28px; }
  .payment-heading { align-items: flex-start; }
  .payment-heading .environment-pill { margin-top: 42px; }
  .payment-grid { gap: 16px; }
  .qr-card, .status-card { padding: 24px 20px; }
  .qr-wrap { padding: 16px; }
  .status-column { grid-template-columns: 1fr; }
  .status-column > .secondary-button { grid-column: auto; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .detail-heading { flex-direction: row; align-items: center; }
  .detail-list > div { grid-template-columns: 1fr; gap: 3px; }
  .detail-list dd { text-align: left; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filter-chip { white-space: nowrap; }
  .site-footer { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
