/* Painel do revendedor (/revendedor). Celular primeiro (360/390), escuro e claro. */
.rv { --rv-bg:#fff; --rv-card:#fff; --rv-soft:#f3f6fb; --rv-line:#e1e7f0; --rv-text:#14181f; --rv-mute:#5d6676; --rv-accent:#1f6bff; --rv-accent2:#5b8cff; --rv-ok:#14683a; padding: 1.25rem 0 3rem; color: var(--rv-text); }
html[data-theme="dark"] .rv { --rv-bg:#0d0f14; --rv-card:#15181f; --rv-soft:#1b1f28; --rv-line:rgba(255,255,255,.09); --rv-text:#eef1f6; --rv-mute:#9aa4b5; --rv-accent:#3d82ff; --rv-accent2:#7aa6ff; --rv-ok:#8be0ac; }
.rv__box { max-width: 1240px; margin: 0 auto; padding-left: 16px; padding-right: 16px; box-sizing: border-box; display: grid; gap: 1rem; }
.rv h1, .rv h2 { color: var(--rv-text); margin: 0; }
.rv-hero { display: grid; gap: 1rem; padding: 1.3rem 1.1rem; border-radius: 1.1rem; border: 1px solid var(--rv-line); background: radial-gradient(120% 140% at 0% 0%, rgba(61,130,255,.22), transparent 55%), var(--rv-card); }
.rv-kicker { margin: 0 0 .3rem; font-size: 12px; letter-spacing: .08em; font-weight: 700; color: var(--rv-accent); }
.rv h1 { font-size: 28px; line-height: 1.1; }
.rv h2 { font-size: 18px; }
.rv__lead, .rv-sub { margin: .45rem 0 0; color: var(--rv-mute); font-size: 14.5px; line-height: 1.5; }
.rv-stats { display: grid; grid-template-columns: 1fr; gap: .6rem; margin-top: 1rem; }
.rv-stat { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: .8rem; background: var(--rv-soft); border: 1px solid var(--rv-line); min-width: 0; }
.rv-stat__icon, .rv-plan__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: .7rem; color: #fff; background: linear-gradient(135deg, var(--rv-accent), var(--rv-accent2)); }
.rv-stat__icon svg, .rv-plan__icon svg { width: 19px; height: 19px; }
.rv-stat small { display: block; font-size: 12px; color: var(--rv-mute); }
.rv-stat strong { font-size: 19px; color: var(--rv-text); overflow-wrap: anywhere; }
.rv-card { padding: 1.1rem; border-radius: 1.1rem; border: 1px solid var(--rv-line); background: var(--rv-card); min-width: 0; }
.rv-tabs { display: flex; gap: .4rem; margin: .9rem 0; padding: .3rem; border-radius: .8rem; background: var(--rv-soft); overflow-x: auto; scrollbar-width: none; }
.rv-tab { flex: 1 0 auto; min-height: 42px; padding: 0 .9rem; border: 0; border-radius: .6rem; background: transparent; color: var(--rv-mute); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.rv-tab.is-on { background: linear-gradient(135deg, var(--rv-accent), var(--rv-accent2)); color: #fff; box-shadow: 0 6px 18px rgba(61,130,255,.35); }
.rv-plans, .rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.rv-list { margin-top: .8rem; }
.rv-plan { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--rv-line); border-radius: 1rem; background: var(--rv-soft); min-width: 0; transition: transform .15s, border-color .15s; }
.rv-plan:hover { border-color: var(--rv-accent); transform: translateY(-2px); }
.rv-plan__head { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.rv-plan__head div { display: grid; min-width: 0; }
.rv-plan__head strong { font-size: 15.5px; color: var(--rv-text); overflow-wrap: anywhere; }
.rv-plan__head span:not(.rv-plan__icon) { font-size: 12.5px; color: var(--rv-mute); }
.rv-plan__price small { display: block; font-size: 12px; color: var(--rv-mute); }
.rv-plan__price b { font-size: 30px; line-height: 1.1; color: var(--rv-text); }
.rv-plan__price em { font-style: normal; margin-left: .35rem; font-size: 13px; color: var(--rv-mute); }
.rv-go { width: 100%; min-height: 48px; border: 0; border-radius: .8rem; color: #fff; font: inherit; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, var(--rv-accent), var(--rv-accent2)); box-shadow: 0 8px 22px rgba(61,130,255,.32); }
.rv-go:disabled { opacity: .6; cursor: default; }
.rv-go--small { width: auto; min-width: 9rem; min-height: 42px; padding: 0 1rem; }
.rv-item { display: grid; gap: .5rem; padding: .9rem; border: 1px solid var(--rv-line); border-radius: .9rem; background: var(--rv-soft); min-width: 0; }
.rv-item__top, .rv-item__meta { display: flex; justify-content: space-between; gap: .6rem; align-items: center; flex-wrap: wrap; }
.rv-item__top strong { font-size: 15px; overflow-wrap: anywhere; }
.rv-item__meta span { font-size: 12px; color: var(--rv-mute); }
.rv-pill { font-style: normal; font-size: 12px; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.rv-pill--ok { background: rgba(31,157,85,.16); color: var(--rv-ok); }
.rv-pill--wait { background: rgba(255,190,50,.18); color: #c58a00; }
.rv-pill--off { background: rgba(220,70,70,.16); color: #e15a5a; }
.rv-key { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.rv-key code { flex: 1 1 100%; min-width: 0; padding: .6rem .7rem; border-radius: .6rem; background: var(--rv-bg); border: 1px solid var(--rv-line); color: var(--rv-text); font-size: 13px; overflow-wrap: anywhere; word-break: break-all; }
.rv-btn { flex: 1 1 0; min-height: 42px; border-radius: .7rem; border: 1px solid var(--rv-line); background: var(--rv-card); color: var(--rv-text); font: inherit; font-weight: 600; cursor: pointer; }
.rv-btn--solid { background: var(--rv-accent); border-color: var(--rv-accent); color: #fff; }
.rv__notice { margin: 0; padding: .7rem .9rem; border-radius: .7rem; background: rgba(61,130,255,.14); color: var(--rv-accent); font-size: 14px; }
.rv__error { margin: 0; padding: .7rem .9rem; border-radius: .7rem; background: rgba(220,70,70,.14); color: #e15a5a; font-size: 14px; }
.rv__terms { margin: 0; padding: .8rem 1rem; border-radius: .8rem; background: var(--rv-soft); color: var(--rv-mute); font-size: 13px; line-height: 1.5; }
.rv-empty { color: var(--rv-mute); font-size: 14px; margin: .8rem 0 0; }
@media (min-width: 640px) { .rv-plans { grid-template-columns: repeat(2, 1fr); } .rv-stats { grid-template-columns: repeat(3, 1fr); } .rv-key code { flex: 1 1 auto; } .rv-btn { flex: 0 0 auto; padding: 0 1rem; } .rv h1 { font-size: 32px; } }


.rv-wallet { display: grid; gap: .5rem; align-content: start; padding: 1rem; border-radius: 1rem; border: 1px solid var(--rv-line); background: var(--rv-soft); min-width: 0; }
.rv-wallet small { color: var(--rv-mute); font-size: 13px; }
.rv-wallet strong { font-size: 34px; line-height: 1.1; color: var(--rv-text); }
.rv-wallet__hint { margin: .2rem 0 0; font-size: 13px; color: var(--rv-mute); line-height: 1.45; }
.rv-wallet__tx { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .35rem; }
.rv-wallet__tx li { display: flex; justify-content: space-between; gap: .6rem; font-size: 12.5px; color: var(--rv-mute); }
.rv-wallet__tx b { font-weight: 700; white-space: nowrap; }
.rv-wallet__tx .is-plus { color: var(--rv-ok); }
.rv-wallet__tx .is-minus { color: #e15a5a; }
.rv-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 16px; background: rgba(5,7,12,.72); }
.rv-modal__box { position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; padding: 1.3rem; border-radius: 1.1rem; background: #15181f; color: #eef1f6; border: 1px solid rgba(255,255,255,.1); box-sizing: border-box; }
.rv-modal__box h2 { margin: .2rem 0 .4rem; font-size: 20px; color: #eef1f6; }
.rv-modal__box [data-rv-step] { display: grid; gap: .8rem; }
.rv-modal__box .rv-sub { margin: 0; color: #9aa4b5; font-size: 14px; }
.rv-modal__box .rv-kicker { color: #7aa6ff; margin: 0; font-size: 12px; letter-spacing: .08em; font-weight: 700; }
.rv-modal__x { position: absolute; top: .5rem; right: .7rem; width: 40px; height: 40px; border: 0; background: transparent; color: #9aa4b5; font-size: 28px; cursor: pointer; }
.rv-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.rv-chip { min-height: 40px; padding: 0 .9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: #1b1f28; color: #eef1f6; font: inherit; font-weight: 600; cursor: pointer; }
.rv-chip:hover { border-color: #3d82ff; }
.rv-field { display: grid; gap: .3rem; font-size: 13px; color: #9aa4b5; }
.rv-field input, .rv-field textarea { min-height: 46px; padding: .6rem .8rem; border-radius: .7rem; border: 1px solid rgba(255,255,255,.14); background: #0d0f14; color: #eef1f6; font: inherit; font-size: 16px; box-sizing: border-box; width: 100%; }
.rv-qr { width: 200px; max-width: 70%; margin: 0 auto; border-radius: .6rem; background: #fff; padding: 8px; }
.rv-wait { margin: 0; text-align: center; color: #9aa4b5; font-size: 14px; }
@media (min-width: 900px) { .rv-hero { grid-template-columns: 1.6fr 1fr; align-items: stretch; } .rv-plans { grid-template-columns: repeat(3, 1fr); } .rv-card { padding: 1.4rem; } }
@media (min-width: 1200px) { .rv-plans { grid-template-columns: repeat(4, 1fr); } }

/* Admin > Revendedores: números e campos que salvam sem piscar */
.rs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; }
.rs-stats--card { margin: .6rem 0 .2rem; }
.rs-stat { display: grid; gap: .15rem; padding: .6rem .75rem; border-radius: .7rem; background: #f4f7fb; min-width: 0; }
.rs-stat span { font-size: 12px; color: #666; }
.rs-stat strong { font-size: 17px; color: #212529; overflow-wrap: anywhere; }
.aff-admin__percent input.is-saved { border-color: #1f9d55 !important; box-shadow: 0 0 0 2px rgba(31,157,85,.18); }
.aff-admin__percent input.is-failed { border-color: #c0392b !important; box-shadow: 0 0 0 2px rgba(192,57,43,.18); }
html[data-theme="dark"] .rs-stat { background: #14161b; }
html[data-theme="dark"] .rs-stat span { color: #aab2c0; }
html[data-theme="dark"] .rs-stat strong { color: #eef1f6; }
