:root {
    --bg: #090b10;
    --panel: #121620;
    --panel2: #171c28;
    --text: #f7f8fb;
    --muted: #a5adbd;
    --line: rgba(255,255,255,.09);
    --accent: #7c5cff;
    --accent2: #9f89ff;
    --ok: #2dd4bf;
    --danger: #fb7185;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% -20%, rgba(124,92,255,.28), transparent 38rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

.page {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 90px 0 60px;
}

.page.narrow { width: min(680px, calc(100% - 32px)); }

.hero {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.eyebrow, .tag {
    display: inline-block;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    color: #bcb0ff;
}

h1 {
    margin: 12px 0 16px;
    font-size: clamp(2.3rem, 7vw, 4.8rem);
    line-height: .98;
    letter-spacing: -.055em;
}

.lead {
    margin: 0 auto;
    max-width: 650px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.plans {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 22px;
}

.card, .status-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 24px 80px rgba(0,0,0,.22);
}

.card.featured {
    border-color: rgba(124,92,255,.55);
    box-shadow: 0 24px 90px rgba(124,92,255,.12);
}

.badge {
    position: absolute;
    top: -12px;
    right: 22px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-weight: 900;
    font-size: .68rem;
    letter-spacing: .08em;
}

.card h2 {
    margin: 8px 0 10px;
    font-size: 3rem;
    letter-spacing: -.05em;
}

.card p, .status-card p { color: var(--muted); line-height: 1.65; }

.card ul {
    list-style: none;
    padding: 0;
    margin: 26px 0;
    display: grid;
    gap: 12px;
}

.card li::before {
    content: "✓";
    margin-right: 10px;
    color: var(--ok);
    font-weight: 900;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(124,92,255,.24);
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; }

.btn.secondary {
    background: var(--panel2);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn.small { width: auto; padding: 0 18px; min-height: 42px; }
.btn.telegram { margin-top: 22px; background: linear-gradient(135deg, #1d9bf0, #2aabee); }

.secure, .fine {
    text-align: center;
    color: var(--muted);
    font-size: .88rem;
    margin-top: 28px;
}

.status-card {
    text-align: center;
    padding: 42px;
}

.status-card h1 { font-size: clamp(2rem, 6vw, 3.4rem); }

.status-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(124,92,255,.16);
    border: 1px solid rgba(124,92,255,.4);
    font-size: 2rem;
}

.success .status-icon {
    background: rgba(45,212,191,.14);
    border-color: rgba(45,212,191,.42);
    color: var(--ok);
}

.receipt {
    margin: 28px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    text-align: left;
}

.receipt > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 17px;
    border-bottom: 1px solid var(--line);
}

.receipt > div:last-child { border-bottom: 0; }
.receipt span { color: var(--muted); }
.receipt strong { word-break: break-all; text-align: right; }

.loading {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(5,6,10,.82);
    backdrop-filter: blur(8px);
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 16px;
}

.hidden { display: none; }

.spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,.14);
    border-top-color: white;
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.admin-page {
    width: min(1320px, calc(100% - 30px));
    margin: 0 auto;
    padding: 38px 0 60px;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.admin-head h1 { font-size: 2.6rem; margin: 5px 0 22px; }

.stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stats > div {
    padding: 20px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 18px;
}

.stats span { display: block; color: var(--muted); font-size: .85rem; margin-bottom: 7px; }
.stats strong { font-size: 1.65rem; }

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
}

table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: .8rem; }
td { font-size: .9rem; }

.status {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
}
.status.paid { color: var(--ok); }
.status.pending { color: #fbbf24; }

@media (max-width: 760px) {
    .page { padding-top: 54px; }
    .plans { grid-template-columns: 1fr; }
    .card, .status-card { padding: 24px; border-radius: 20px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}

.pix-highlight {
    margin: -8px 0 16px;
    padding: 11px 14px;
    border-radius: 12px;
    text-align: center;
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .04em;
    background: rgba(45,212,191,.10);
    border: 1px solid rgba(45,212,191,.28);
    color: #7ff5e3;
}

.premium-pix {
    font-size: .78rem;
}

.premium-actions {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}


/* META DA COMUNIDADE */
.goal-card {
    width: min(760px, 100%);
    margin: 28px auto 0;
    padding: 22px 24px 24px;
    border: 1px solid rgba(139, 112, 255, .55);
    border-radius: 20px;
    background:
        radial-gradient(circle at 92% -30%, rgba(139,112,255,.25), transparent 42%),
        linear-gradient(180deg, #171924 0%, #11131b 100%);
    box-shadow:
        0 18px 45px rgba(0,0,0,.28),
        inset 0 1px 0 rgba(255,255,255,.04);
}

.goal-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.goal-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f5f2ff;
    font-size: .92rem;
    font-weight: 850;
    letter-spacing: .02em;
}

.goal-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(124,92,255,.16);
    border: 1px solid rgba(124,92,255,.35);
    color: #b8a8ff;
    font-size: 1.15rem;
}

.goal-number {
    font-size: clamp(1.8rem, 4vw, 2.55rem);
    line-height: 1;
    letter-spacing: -.055em;
    background: linear-gradient(135deg, #ffffff 10%, #a994ff 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.goal-bar {
    position: relative;
    height: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #090b11;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 2px 8px rgba(0,0,0,.55);
}

.goal-bar-fill {
    height: 100%;
    min-width: 5px;
    border-radius: inherit;
    background: linear-gradient(90deg, #7254ff 0%, #9b7cff 58%, #55dbc9 100%);
    box-shadow:
        0 0 18px rgba(124,92,255,.5),
        0 0 24px rgba(85,219,201,.2);
    transition: width .4s ease;
}

@media (max-width: 640px) {
    .goal-card {
        padding: 18px 18px 20px;
        border-radius: 18px;
    }

    .goal-card-title {
        font-size: .84rem;
    }

    .goal-number {
        font-size: 1.8rem;
    }
}


.monthly-prize {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 11px;
    border-radius: 999px;
    border: 1px solid rgba(45,212,191,.30);
    background: rgba(45,212,191,.09);
    color: #8cf5e7;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .035em;
}

.premium-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 20px;
}

.premium-modal.hidden {
    display: none;
}

.premium-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3,5,9,.82);
    backdrop-filter: blur(10px);
}

.premium-modal-card {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid rgba(124,92,255,.50);
    background:
        radial-gradient(circle at 85% 0%, rgba(124,92,255,.20), transparent 40%),
        #121620;
    box-shadow: 0 30px 100px rgba(0,0,0,.48);
}

.premium-modal-card h2 {
    margin: 8px 0 8px;
    font-size: 2rem;
    letter-spacing: -.04em;
}

.premium-modal-card > p {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.55;
}

.premium-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.07);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

#premiumForm {
    display: grid;
    gap: 16px;
}

#premiumForm label {
    display: grid;
    gap: 7px;
}

#premiumForm label > span {
    font-size: .82rem;
    font-weight: 750;
    color: #d9dce5;
}

#premiumForm input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 13px;
    border: 1px solid rgba(255,255,255,.10);
    outline: none;
    background: rgba(255,255,255,.045);
    color: white;
    font: inherit;
}

#premiumForm input:focus {
    border-color: rgba(124,92,255,.75);
    box-shadow: 0 0 0 3px rgba(124,92,255,.12);
}

.premium-prize-note {
    padding: 12px 14px;
    border-radius: 13px;
    border: 1px solid rgba(45,212,191,.22);
    background: rgba(45,212,191,.075);
    color: #dffdf8;
    font-size: .9rem;
}

.modal-fine {
    margin: 13px 0 0 !important;
    font-size: .76rem;
    text-align: center;
}


.goal-rule {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.07);
    color: var(--muted);
    font-size: .8rem;
    text-align: center;
}

.goal-rule strong {
    color: #d8d0ff;
}


.premium-validity {
    margin: 2px 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-align: center;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.07);
    color: var(--muted);
    font-size: .82rem;
}

.premium-validity strong {
    color: #e8e2ff;
}


.goal-period {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(124,92,255,.06);
    border: 1px solid rgba(124,92,255,.16);
    color: var(--muted);
    font-size: .8rem;
    text-align: center;
}

.goal-period strong {
    color: #e5dfff;
}


/* =========================================================
   APOIARNET — RESPONSIVIDADE COMPLETA
   ========================================================= */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
iframe {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea,
a {
    -webkit-tap-highlight-color: transparent;
}

.page,
.admin-page {
    min-width: 0;
}

.card,
.status-card,
.goal-card,
.premium-modal-card,
.table-wrap,
.receipt {
    min-width: 0;
}

.card p,
.status-card p,
.goal-card,
.receipt strong,
.receipt span,
td,
th,
code {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.btn {
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    padding: 12px 16px;
}

/* Tablets e notebooks menores */
@media (max-width: 980px) {
    .page {
        width: min(94vw, 920px);
        padding-top: 62px;
    }

    .plans {
        gap: 16px;
    }

    .card {
        padding: 24px;
    }

    .card h2 {
        font-size: 2.6rem;
    }

    .admin-page {
        width: min(96vw, 1180px);
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goal-card {
        width: 100%;
    }
}

/* Celulares e tablets em modo retrato */
@media (max-width: 760px) {
    body {
        min-width: 0;
    }

    .page {
        width: calc(100% - 24px);
        padding: 34px 0 34px;
    }

    .page.narrow {
        width: calc(100% - 24px);
    }

    .hero {
        margin-bottom: 28px;
        padding: 0 2px;
    }

    .hero h1,
    h1 {
        font-size: clamp(2rem, 10vw, 3.15rem);
        line-height: 1.02;
        letter-spacing: -.045em;
    }

    .lead {
        font-size: .98rem;
        line-height: 1.58;
    }

    .plans {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card,
    .status-card {
        padding: 22px 18px;
        border-radius: 19px;
    }

    .card h2 {
        font-size: 2.5rem;
    }

    .card p {
        font-size: .95rem;
    }

    .card ul {
        gap: 10px;
        margin: 21px 0;
    }

    .card li {
        line-height: 1.4;
    }

    .badge {
        right: 14px;
        top: -11px;
        max-width: calc(100% - 28px);
        white-space: normal;
        text-align: center;
    }

    .monthly-prize {
        width: 100%;
        justify-content: center;
        text-align: center;
        line-height: 1.3;
    }

    .pix-highlight,
    .premium-validity,
    .goal-period,
    .goal-rule {
        line-height: 1.35;
    }

    .goal-card {
        margin-top: 22px;
        padding: 18px;
        border-radius: 18px;
    }

    .goal-card-top {
        align-items: flex-start;
        gap: 12px;
    }

    .goal-card-title {
        flex: 1;
        min-width: 0;
    }

    .goal-number {
        flex: 0 0 auto;
        font-size: 1.7rem;
    }

    .goal-bar {
        height: 13px;
    }

    .receipt > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        padding: 13px 14px;
    }

    .receipt strong {
        width: 100%;
        text-align: left;
    }

    .status-card {
        padding: 28px 18px;
    }

    .status-card h1 {
        font-size: clamp(1.9rem, 9vw, 2.75rem);
    }

    .status-icon {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }

    .premium-actions {
        width: 100%;
    }

    /* Modal Premium */
    .premium-modal {
        align-items: end;
        padding: 10px;
    }

    .premium-modal-card {
        width: 100%;
        max-height: 92vh;
        overflow-y: auto;
        padding: 24px 18px 18px;
        border-radius: 22px 22px 16px 16px;
    }

    .premium-modal-card h2 {
        font-size: 1.75rem;
        padding-right: 34px;
    }

    #premiumForm input {
        min-height: 52px;
        font-size: 16px; /* evita zoom automático no iPhone */
    }

    .premium-prize-note {
        line-height: 1.4;
    }

    /* Admin */
    .admin-page {
        width: calc(100% - 20px);
        padding: 20px 0 34px;
    }

    .admin-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-head h1 {
        margin-bottom: 10px;
        font-size: 2.15rem;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stats > div {
        padding: 16px 14px;
    }

    .stats strong {
        font-size: 1.35rem;
    }

    .table-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 980px;
    }

    th,
    td {
        padding: 11px 12px;
        font-size: .82rem;
    }

    .secure,
    .fine {
        padding: 0 8px;
        line-height: 1.45;
    }
}

/* Celulares pequenos */
@media (max-width: 480px) {
    .page {
        width: calc(100% - 18px);
        padding-top: 24px;
    }

    .eyebrow,
    .tag {
        font-size: .68rem;
        letter-spacing: .11em;
    }

    .hero h1,
    h1 {
        font-size: clamp(1.85rem, 11vw, 2.55rem);
    }

    .lead {
        font-size: .93rem;
    }

    .card,
    .status-card {
        padding: 19px 15px;
        border-radius: 17px;
    }

    .card h2 {
        font-size: 2.25rem;
    }

    .btn {
        min-height: 52px;
        border-radius: 13px;
        font-size: .94rem;
    }

    .monthly-prize {
        padding: 8px 9px;
        font-size: .68rem;
    }

    .pix-highlight {
        font-size: .73rem;
    }

    .goal-card {
        padding: 16px 14px 17px;
    }

    .goal-card-top {
        align-items: center;
    }

    .goal-card-title {
        font-size: .8rem;
    }

    .goal-icon {
        width: 28px;
        height: 28px;
        border-radius: 9px;
    }

    .goal-number {
        font-size: 1.55rem;
    }

    .goal-period,
    .goal-rule {
        padding: 9px 10px;
        font-size: .75rem;
    }

    .receipt {
        border-radius: 13px;
    }

    .status-card h1 {
        font-size: 2rem;
    }

    .premium-modal {
        padding: 6px;
    }

    .premium-modal-card {
        padding: 22px 14px 16px;
        border-radius: 20px 20px 14px 14px;
    }

    .premium-modal-close {
        top: 10px;
        right: 10px;
    }

    .premium-modal-card h2 {
        font-size: 1.55rem;
    }

    #premiumForm {
        gap: 13px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .stats > div {
        min-width: 0;
    }

    .stats span {
        font-size: .76rem;
    }

    .stats strong {
        font-size: 1.15rem;
        overflow-wrap: anywhere;
    }
}

/* Muito pequenos / aparelhos antigos */
@media (max-width: 360px) {
    .plans {
        gap: 14px;
    }

    .card,
    .status-card {
        padding-left: 13px;
        padding-right: 13px;
    }

    .card h2 {
        font-size: 2rem;
    }

    .goal-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .goal-number {
        margin-left: 38px;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

/* Telas largas */
@media (min-width: 1440px) {
    .page {
        width: min(1180px, calc(100% - 48px));
    }

    .plans {
        gap: 28px;
    }

    .card {
        padding: 34px;
    }

    .goal-card {
        width: min(840px, 100%);
    }
}
