@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --accent: #00d97e;
    --accent2: #0077ff;
    --accent-grad: linear-gradient(135deg, #0077ff 0%, #00d97e 100%);
    --dark: #080d12;
    --dark2: #0e1520;
    --surface: rgba(255,255,255,0.07);
    --surface-light: rgba(255,255,255,0.95);
    --border: rgba(255,255,255,0.10);
    --border-light: rgba(0,200,120,0.15);
    --text-muted: #7a9ab0;
    --radius: 20px;
    --radius-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--dark);
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

/* ── SHELL ─────────────────────────────────────── */
.mobile-shell {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a1628 0%, #080d12 60%, #060a0f 100%);
    position: relative;
    overflow-x: hidden;
    padding-bottom: 90px;
}

/* ── TOPBAR ─────────────────────────────────────── */
.topbar {
    padding: 52px 20px 28px;
    position: relative;
    overflow: hidden;
}
.topbar::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(0,119,255,.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.topbar::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(0,217,126,.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.topbar-greeting {
    font-size: 13px;
    color: rgba(255,255,255,.55);
    margin-bottom: 4px;
}
.topbar-balance {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}
.topbar-name {
    font-size: 13px;
    color: rgba(255,255,255,.7);
    margin-top: 4px;
}

/* ── QUICK ACTIONS ──────────────────────────────── */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 16px 4px;
}
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.quick-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border);
    color: #fff;
    transition: background .2s, transform .15s;
}
.quick-action-icon:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }
.quick-action-label { font-size: 10px; color: rgba(255,255,255,.55); text-align: center; }

/* ── BANNER CARD ────────────────────────────────── */
.banner-card {
    margin: 16px;
    border-radius: var(--radius);
    padding: 20px;
    background: var(--accent-grad);
    position: relative;
    overflow: hidden;
    color: #fff;
}
.banner-card::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 150px; height: 150px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
}
.banner-card::after {
    content: '';
    position: absolute;
    bottom: -50px; right: 60px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
}
.banner-card .badge-pill {
    background: rgba(255,255,255,.25);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}
.banner-card h3 { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.banner-card p { font-size: 12px; opacity: .85; margin: 0; }

/* ── SECTION HEADER ─────────────────────────────── */
.sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 8px;
}
.sec-header h2 { font-size: 15px; font-weight: 700; margin: 0; color: #fff; }
.sec-header a { font-size: 12px; color: var(--accent2); text-decoration: none; font-weight: 600; }

/* ── PRODUCT GRID ───────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
}
.product-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    display: block;
    transition: transform .2s, background .2s;
}
.product-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.09); color: #fff; }
.product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center center;
}
.product-card-body { padding: 8px 10px 10px; }
.product-card-name { font-size: 12px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.product-card-price { font-size: 14px; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.product-card-badge { font-size: 10px; color: rgba(255,255,255,.5); margin-top: 2px; }

/* ── LIST PRODUCT (loja full) ───────────────────── */
.product-list-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    gap: 0;
    text-decoration: none;
    color: #fff;
    transition: background .2s;
}
.product-list-card:hover { background: rgba(255,255,255,.08); color: #fff; }
.product-list-card img { width: 110px; height: 110px; object-fit: cover; object-position: center center; flex-shrink: 0; }
.product-list-body { padding: 12px; display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.product-list-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.product-list-desc { font-size: 11px; color: rgba(255,255,255,.5); line-height: 1.4; }
.product-list-price { font-size: 16px; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── CARD GLASS ─────────────────────────────────── */
.card-glass {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}
.card-glass-light {
    background: var(--surface-light);
    border-radius: var(--radius);
    color: var(--dark);
    border: none;
}

/* ── STAT CARDS ─────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.stat-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
}
.stat-label { font-size: 11px; color: rgba(255,255,255,.45); margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 800; }
.stat-value.accent { background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── TX LIST ─────────────────────────────────────── */
.tx-list { padding: 0 16px; }
.tx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.tx-icon.deposit  { background: rgba(72,199,142,.15); color: #48c78e; }
.tx-icon.withdraw { background: rgba(255,77,111,.15);  color: var(--accent); }
.tx-icon.purchase { background: rgba(255,140,66,.15);  color: var(--accent2); }
.tx-icon.cashback { background: rgba(100,220,255,.15); color: #64dcff; }
.tx-icon.referral { background: rgba(180,100,255,.15); color: #b464ff; }
.tx-icon.reward   { background: rgba(255,220,50,.15);  color: #ffd632; }
.tx-desc { flex: 1; }
.tx-desc-title { font-size: 13px; font-weight: 600; }
.tx-desc-sub { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 1px; }
.tx-amount { font-size: 14px; font-weight: 700; }
.tx-amount.positive { color: #48c78e; }
.tx-amount.negative { color: var(--accent); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn-main {
    background: var(--accent-grad);
    border: none;
    color: #fff !important;
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
}
.btn-main:hover { opacity: .88; transform: translateY(-1px); }
.btn-ghost {
    background: rgba(255,255,255,.08);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-sm-main {
    background: var(--accent-grad);
    border: none;
    color: #fff;
    border-radius: 9px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .2s;
}
.btn-sm-main:hover { opacity: .85; color: #fff; }

/* ── FORM CONTROLS ───────────────────────────────── */
.lx-input {
    background: rgba(255,255,255,.07);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: border-color .2s, background .2s;
    font-family: inherit;
}
.lx-input::placeholder { color: rgba(255,255,255,.3); }
.lx-input:focus { border-color: var(--accent2); background: rgba(255,255,255,.1); }
.lx-select {
    background: rgba(255,255,255,.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23aaa' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
    border: 1px solid var(--border);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 13px 36px 13px 14px;
    font-size: 14px;
    width: 100%;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .2s;
    font-family: inherit;
}
.lx-select:focus { border-color: var(--accent2); }
.lx-label { font-size: 12px; color: rgba(255,255,255,.5); margin-bottom: 6px; display: block; font-weight: 500; }
.lx-textarea {
    background: rgba(255,255,255,.07);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    font-size: 13px;
    width: 100%;
    outline: none;
    resize: vertical;
    font-family: inherit;
}
.lx-textarea:focus { border-color: var(--accent2); }
.form-section { padding: 0 16px; }
.form-group { margin-bottom: 14px; }

/* ── BOTTOM NAV ──────────────────────────────────── */
.bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(460px, 100%);
    background: rgba(8,13,18,.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,119,255,.12);
    display: flex;
    justify-content: space-around;
    padding: 10px 4px 14px;
    z-index: 100;
}
.bottom-nav a {
    text-decoration: none;
    color: rgba(255,255,255,.4);
    font-size: 10px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: color .2s;
    position: relative;
}
.bottom-nav a i { font-size: 22px; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--accent-grad);
    border-radius: 0 0 4px 4px;
}

/* ── PAGE HEADER ─────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 56px 16px 16px;
}
.page-header h1 { font-size: 20px; font-weight: 800; margin: 0; }
.back-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.08);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
    font-size: 16px;
}

/* ── FLASH MESSAGES ──────────────────────────────── */
.flash-wrap { padding: 12px 16px 0; }
.flash-success {
    background: rgba(72,199,142,.15);
    border: 1px solid rgba(72,199,142,.3);
    color: #48c78e;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
}
.flash-error {
    background: rgba(255,77,111,.15);
    border: 1px solid rgba(255,77,111,.3);
    color: #ff6b8a;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
}

/* ── PROFILE AVATAR ──────────────────────────────── */
.avatar-circle {
    width: 52px; height: 52px;
    background: var(--accent-grad);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

/* ── AFILIADOS LEVELS ────────────────────────────── */
.level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.7);
    flex-shrink: 0;
}
.level-badge.lv1 { background: rgba(255,140,66,.2); color: #ff8c42; }
.level-badge.lv2 { background: rgba(255,77,111,.2); color: #ff4d6f; }
.level-badge.lv3 { background: rgba(180,100,255,.2); color: #b464ff; }

/* ── REFERRAL LINK BOX ───────────────────────────── */
.ref-link-box {
    background: rgba(255,255,255,.06);
    border: 1px dashed rgba(255,255,255,.2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 12px;
    color: rgba(255,255,255,.6);
    word-break: break-all;
    cursor: pointer;
    position: relative;
}
.ref-link-box::after {
    content: '\F4C5';
    font-family: 'bootstrap-icons';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent2);
}

/* ── SWITCH TOGGLE ───────────────────────────────── */
.lx-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* ── LOGIN / CADASTRO SPECIAL ────────────────────── */
.auth-page {
    min-height: 100vh;
    background: #060a0f;
    display: flex;
    flex-direction: column;
    max-width: 460px;
    margin: 0 auto;
    position: relative;
}
.auth-hero {
    width: 100%;
    height: 46vh;
    min-height: 220px;
    max-height: 360px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.auth-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.auth-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,.15) 0%,
        rgba(0,0,0,.1) 50%,
        rgba(14,10,13,.9) 100%);
}
.auth-hero-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    padding: 8px 14px;
}
.auth-hero-logo {
    font-size: 18px;
    font-weight: 900;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}
.auth-hero-tagline { font-size: 11px; color: rgba(255,255,255,.55); }
.auth-body {
    flex: 1;
    margin-top: -28px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}
.auth-card {
    background: rgba(255,255,255,.96);
    border-radius: 24px 24px 0 0;
    padding: 28px 22px 32px;
    flex: 1;
    backdrop-filter: blur(20px);
    color: #1a1a2e;
}
.auth-card .lx-label {
    color: #555;
    font-weight: 600;
}
.auth-card .lx-input,
.auth-card .lx-select {
    background: #f5f5f8;
    border: 1.5px solid #e0e0e8;
    color: #1a1a2e;
    border-radius: 10px;
}
.auth-card .lx-input::placeholder { color: #aaa; }
.auth-card .lx-input:focus,
.auth-card .lx-select:focus {
    border-color: #ff8c42;
    background: #fff;
}
.auth-divider {
    height: 1px;
    background: #ececec;
    margin: 16px 0;
}
.auth-referral-banner {
    background: linear-gradient(135deg, #f0fff8, #f0f8ff);
    border: 1.5px solid #b3e6d0;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.auth-referral-avatar {
    width: 38px;
    height: 38px;
    background: var(--accent-grad);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.auth-card .btn-main { color: #fff !important; }
.auth-card-footer {
    text-align: center;
    padding: 14px 0 4px;
    font-size: 13px;
    color: #888;
}
.auth-card-footer a { color: #0077ff; font-weight: 700; text-decoration: none; }

/* ── PIX QR ──────────────────────────────────────── */
.qr-wrap {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    justify-content: center;
    margin: 0 auto 16px;
    max-width: 220px;
}
.qr-wrap img { width: 100%; border-radius: 8px; }

/* ── SCROLLBAR ───────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

/* ── DISABLE DOUBLE-TAP ZOOM ─────────────────────── */
* { touch-action: manipulation; }

/* ── PREVENT IOS ZOOM ON INPUT FOCUS ────────────── */
input, select, textarea, button {
    font-size: 16px !important;
}
