/* Self-service open site — independent of admin UI */
:root {
    --bg: #070a10;
    --card: rgba(18, 22, 34, 0.9);
    --border: rgba(255, 255, 255, 0.07);
    --text: #eef0f7;
    --muted: #8b91a8;
    --accent: #10b981;
    --accent2: #34d399;
    --danger: #f87171;
    --warn: #fbbf24;
    --blue: #60a5fa;
    --radius: 18px;
    --font: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 480px at 50% -10%, rgba(16, 185, 129, 0.18), transparent 55%),
        radial-gradient(600px 400px at 100% 20%, rgba(96, 165, 250, 0.08), transparent 50%);
    z-index: 0;
}

/* PIX / UPI channel switch (same open page) */
.channel-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}
.ch-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0b0f18;
    color: var(--muted);
    border-radius: 12px;
    padding: 12px 10px;
    font-weight: 650;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.ch-btn:hover { border-color: rgba(255,255,255,.22); color: var(--text); }
.ch-btn.active {
    color: #042f1e;
    background: linear-gradient(135deg, #34d399, #10b981);
    border-color: transparent;
}
body.ch-upi .ch-btn.active {
    color: #0b1f3a;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}
body.ch-upi .glow {
    background:
        radial-gradient(900px 480px at 50% -10%, rgba(96, 165, 250, 0.18), transparent 55%),
        radial-gradient(600px 400px at 0% 30%, rgba(16, 185, 129, 0.08), transparent 50%);
}

.wrap {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 36px 18px 48px;
}

.hero {
    text-align: center;
    margin-bottom: 22px;
}

.badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent2);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.hero h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.lead {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

/* Network-wide extract success rate (public) */
.net-stats {
    padding: 16px 18px !important;
}

.net-stats-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.net-stats-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.net-stats-rate {
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--accent2);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.net-stats-rate.is-low {
    color: var(--warn);
}

.net-stats-rate.is-bad {
    color: var(--danger);
}

.net-stats-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-bottom: 8px;
}

.net-stats-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #34d399, #10b981);
    transition: width 0.45s ease;
}

.mode-extract .net-stats-fill {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.mode-extract .net-stats-rate {
    color: var(--blue);
}

.net-stats-meta {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
    line-height: 1.45;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    margin-bottom: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.opt {
    font-weight: 400;
    color: var(--muted);
    font-size: 12px;
}

input, textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

textarea {
    resize: vertical;
    min-height: 96px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.45;
}

.hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.hint code {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent2);
}

.hint.steps {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1.55;
}

.hint.steps p {
    margin: 0 0 6px;
}

.hint.steps ol {
    margin: 0;
    padding-left: 1.2em;
}

.hint.steps li {
    margin: 4px 0;
}

.hint.steps a,
.tips a {
    color: var(--accent2);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

.hint.steps a:hover,
.tips a:hover {
    opacity: 0.9;
}

.agree {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12.5px;
    color: var(--muted);
    margin: 8px 0 16px;
    cursor: pointer;
}

.agree input {
    width: auto;
    margin-top: 3px;
    accent-color: var(--accent);
}

.btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 13px 16px;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    color: #042f1e;
    background: linear-gradient(135deg, #34d399, #10b981);
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}

.btn:hover:not(:disabled) { opacity: 0.95; transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    margin-top: 12px;
}

.err {
    margin-top: 12px;
    color: var(--danger);
    font-size: 13px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.22);
    border-radius: 10px;
    padding: 10px 12px;
}

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.row-between h2 {
    font-size: 16px;
    font-weight: 650;
}

.order-id {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    color: var(--blue);
    border: 1px solid rgba(96, 165, 250, 0.25);
    margin-bottom: 14px;
}

.status-pill.plus,
.status-pill.link_ready {
    background: rgba(16, 185, 129, 0.14);
    color: var(--accent2);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-pill.failed {
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.28);
}

.status-pill.paying {
    background: rgba(167, 139, 250, 0.12);
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.28);
}

.status-pill.extracting {
    background: rgba(96, 165, 250, 0.12);
    color: var(--blue);
    border-color: rgba(96, 165, 250, 0.25);
}

.bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-bottom: 12px;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.4s ease;
}

.status-msg {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 16px;
    min-height: 1.4em;
}

.meta {
    display: grid;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}

.meta > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.meta dt { color: var(--muted); }
.meta dd {
    font-family: var(--mono);
    font-size: 12px;
    text-align: right;
    word-break: break-all;
}

.result {
    margin-top: 14px;
    border-radius: 12px;
    padding: 14px;
}

.result.ok {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.result.bad {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.result-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.result.ok .result-title { color: var(--accent2); }
.result.bad .result-title { color: var(--danger); }

.result p { font-size: 13px; color: var(--muted); }

.tips h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.tips ul {
    padding-left: 18px;
    color: var(--muted);
    font-size: 12.5px;
}

.tips li { margin-bottom: 6px; }

.foot {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin-top: 8px;
}

.foot .sep { margin: 0 6px; opacity: 0.5; }

.mode-switch {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--muted);
}

.mode-switch a {
    color: var(--accent2);
    text-decoration: none;
}

.mode-switch a:hover { text-decoration: underline; }
.mode-switch .sep { margin: 0 8px; opacity: 0.45; }

.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.product-card:hover,
.product-card:focus {
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    outline: none;
}

.product-card:active {
    transform: translateY(0);
}

/* Fallback visible even if advanced CSS fails */
.product-card h2,
.product-card p,
.product-cta {
    color: inherit;
}

.product-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.tag-link {
    color: var(--blue);
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.28);
}

.tag-pay {
    color: var(--accent2);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.product-card h2 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.product-card > p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
}

.product-points {
    padding-left: 18px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 14px;
}

.product-points li { margin-bottom: 4px; }

.product-cta {
    font-size: 13px;
    font-weight: 650;
    color: var(--accent2);
}

.link-hint {
    margin-bottom: 12px !important;
}

.copy-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.copy-row input,
.copy-row textarea {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: 12px;
}

.copy-row textarea {
    min-height: 72px;
    resize: vertical;
}

.btn.sm {
    width: auto;
    flex-shrink: 0;
    padding: 10px 12px;
    font-size: 12.5px;
    margin-top: 0;
}

.link-open {
    display: inline-block;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--accent2);
}

.mode-extract .badge {
    color: var(--blue);
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.28);
}

.mode-extract .btn:not(.ghost) {
    color: #0b1f3a;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.mode-extract .glow {
    background:
        radial-gradient(900px 480px at 50% -10%, rgba(96, 165, 250, 0.16), transparent 55%),
        radial-gradient(600px 400px at 100% 20%, rgba(16, 185, 129, 0.06), transparent 50%);
}

.hub-direct {
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    margin: 4px 0 14px;
}

.hub-direct a {
    color: var(--accent2);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hub-direct .sep {
    margin: 0 8px;
    opacity: 0.45;
}

@media (max-width: 420px) {
    .hero h1 { font-size: 24px; }
    .wrap { padding-top: 24px; }
    .copy-row { flex-direction: column; }
    .btn.sm { width: 100%; }
}
