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

:root {
    --bg-1: #0a0a0a;
    --bg-2: #161616;
    --bg-3: #1f1f1f;
    --bg-4: #2a2a2a;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --orange-light: #fb923c;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #facc15;
    --text-1: #fafafa;
    --text-2: #a3a3a3;
    --text-3: #6b7280;
    --border: #2a2a2a;
    --shadow: 0 20px 60px rgba(0,0,0,.5);
}

body {
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-1);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background com pontos animados */
.bg-pontos {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(249,115,22,.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(249,115,22,.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(249,115,22,.1) 0%, transparent 50%);
    pointer-events: none;
}
.bg-pontos::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(249,115,22,.4) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: .15;
}

/* Container principal */
.app {
    position: relative; z-index: 1;
    min-height: 100vh;
    padding: 30px 20px 100px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Card principal */
.card-principal {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 1100px;
    padding: 36px;
    position: relative;
}

/* Botões topo */
.btn-tutorial, .btn-menu, .btn-sair {
    position: absolute;
    top: 24px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-1);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: .15s;
}
.btn-tutorial { left: 24px; }
.btn-tutorial:hover { background: #2a2a2a; }
.btn-menu, .btn-sair { right: 24px; }
.btn-menu {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    border: none;
    color: white;
    padding: 10px 18px;
}
.btn-menu:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(249,115,22,.3); }
.btn-sair { padding: 10px; }

/* Header */
.header {
    text-align: center;
    margin-bottom: 36px;
}
.header-icone {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 8px 24px rgba(249,115,22,.4);
    vertical-align: middle;
    margin-right: 12px;
}
.header h1 {
    display: inline-block;
    font-size: 26px;
    font-weight: 700;
    vertical-align: middle;
}
.header .sub {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 6px;
}

/* Grid principal */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

.coluna .titulo {
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 14px;
    padding-left: 10px;
    border-left: 3px solid var(--orange);
}

/* Saldos */
.saldos {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.saldo-pill {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
}
.saldo-pill .icon { color: var(--orange); }
.saldo-pill.verde .icon { color: var(--green); }
.saldo-pill .label { color: var(--text-2); font-size: 11px; }
.saldo-pill .valor { color: var(--text-1); font-weight: 700; font-size: 14px; }

/* Campo APLICATIVO */
.campo-label {
    font-size: 11px;
    color: var(--orange);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.combo-app {
    background: var(--bg-3);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: .15s;
    font-size: 14px;
    color: var(--text-2);
}
.combo-app:hover, .combo-app.aberto { border-color: var(--orange); }
.combo-app .seta { margin-left: auto; transition: .2s; }
.combo-app.aberto .seta { transform: rotate(180deg); }
.combo-app input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-1);
    font-size: 14px;
}
.combo-app input::placeholder { color: var(--text-3); }

/* Lista de apps (dropdown) */
.lista-apps-wrap {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-top: 8px;
    overflow: hidden;
    display: none;
}
.lista-apps-wrap.aberto { display: block; }

.tabs {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
}
.tab {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tab:hover { background: var(--bg-4); }
.tab.ativo { background: var(--yellow); color: #1a1a1a; }

.lista-apps {
    max-height: 240px;
    overflow-y: auto;
}
.lista-apps::-webkit-scrollbar { width: 6px; }
.lista-apps::-webkit-scrollbar-track { background: var(--bg-3); }
.lista-apps::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 6px; }

.app-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: .15s;
}
.app-item:hover { background: var(--bg-4); }
.app-item:last-child { border-bottom: none; }

.app-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.app-nome {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}
.app-precos {
    text-align: right;
    font-size: 11px;
    line-height: 1.5;
}
.app-precos .real { color: var(--green); font-weight: 700; }
.app-precos .credito { color: var(--text-2); }

/* Campo MAC */
.campo-mac {
    background: var(--bg-3);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.campo-mac:focus-within { border-color: var(--orange); }
.campo-mac input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-1);
    font-family: ui-monospace, monospace;
    font-size: 14px;
}
.campo-mac input::placeholder { color: var(--text-3); }
.campo-mac .icon { color: var(--orange); }

.tip-robo {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-2);
    text-align: center;
}
.tip-robo .icon { color: var(--orange); }

/* Coluna direita - ação e pagamento */
.acao-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.acao-card .placeholder-icon {
    width: 50px; height: 50px;
    border: 2px solid var(--bg-4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    margin-bottom: 12px;
}
.acao-card h3 {
    font-size: 14px;
    color: var(--text-1);
    margin-bottom: 4px;
}
.acao-card p {
    font-size: 12px;
    color: var(--text-2);
}
.acao-card.com-app {
    text-align: left;
    align-items: stretch;
    justify-content: flex-start;
}
.acao-app-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.acao-preco-grande {
    font-size: 32px;
    font-weight: 800;
    color: var(--green);
    margin: 8px 0;
}
.acao-preco-credito {
    font-size: 13px;
    color: var(--text-2);
}

/* Botão ATIVAR */
.btn-ativar {
    width: 100%;
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(249,115,22,.3);
    transition: .15s;
}
.btn-ativar:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(249,115,22,.4); }
.btn-ativar:active { transform: translateY(0); }
.btn-ativar:disabled { opacity: .5; cursor: not-allowed; }

.notificacoes {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-2);
}

/* Banner instalar */
.banner-instalar {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 50;
    max-width: 90%;
    box-shadow: var(--shadow);
}
.banner-instalar .icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.banner-instalar .text { font-size: 12px; line-height: 1.4; flex: 1; min-width: 200px; }
.banner-instalar .text strong { display: block; }
.banner-instalar .text span { color: var(--text-2); font-size: 11px; }
.banner-instalar .btn-instalar {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.banner-instalar .fechar {
    background: transparent;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    font-size: 16px;
}

/* ===== MODAIS ===== */
.modal-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .2s;
}
.modal-bg.aberto { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp .25s;
    position: relative;
}
.modal.grande { max-width: 700px; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.modal-head .icon-sq {
    width: 40px; height: 40px;
    background: var(--bg-3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    border: 1px solid rgba(249,115,22,.3);
    flex-shrink: 0;
}
.modal-head h2 { font-size: 16px; font-weight: 700; flex: 1; }
.modal-head .sub { font-size: 12px; color: var(--text-2); }
.modal-head .acoes-head { display: flex; gap: 8px; }
.modal-head .acoes-head button {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-3);
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-head .acoes-head button:hover { background: var(--bg-4); color: var(--text-1); }
.modal-head .yt { background: #ff0000; color: white; }
.modal-head .wpp { background: #25d366; color: white; }
.btn-fechar { background: var(--bg-3) !important; }

/* Inputs gerais */
.input-grupo { margin-bottom: 14px; }
.input-grupo label {
    display: block;
    font-size: 11px;
    color: var(--text-2);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.input-grupo input,
.input-grupo select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-3);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text-1);
    font-size: 14px;
    outline: none;
    transition: border .15s;
}
.input-grupo input:focus,
.input-grupo select:focus { border-color: var(--orange); }
.input-grupo .with-icon { position: relative; }
.input-grupo .with-icon input { padding-right: 40px; }
.input-grupo .with-icon .iconbtn {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-2);
    cursor: pointer;
}
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dica { font-size: 11px; color: var(--text-3); margin-top: 4px; text-align: center; }

/* Botão laranja grande */
.btn-laranja {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: .15s;
}
.btn-laranja:hover { transform: translateY(-1px); }
.btn-laranja.outline {
    background: transparent;
    border: 1.5px solid var(--orange);
    color: var(--orange);
}
.btn-cinza {
    width: 100%;
    padding: 14px;
    background: var(--bg-3);
    color: var(--text-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.modal-link-bottom {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-2);
}
.modal-link-bottom a { color: var(--orange); cursor: pointer; font-weight: 700; }

.erro-box {
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.3);
    color: #fca5a5;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 14px;
}

/* ===== MENU SLIDE ===== */
.menu-slide {
    position: fixed;
    top: 90px;
    right: 24px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    width: 240px;
    z-index: 200;
    box-shadow: var(--shadow);
    display: none;
}
.menu-slide.aberto { display: block; }
.menu-user {
    padding: 10px 8px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.menu-user .nome { font-weight: 700; font-size: 13px; }
.menu-user .email { font-size: 11px; color: var(--text-2); }
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    color: var(--text-1);
    text-decoration: none;
    cursor: pointer;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}
.menu-item:hover { background: var(--bg-3); }
.menu-item .icon { color: var(--orange); width: 18px; text-align: center; }
.menu-item .seta { margin-left: auto; color: var(--text-3); }
.menu-item.sair { color: var(--red); }
.menu-item.sair .icon { color: var(--red); }

/* ===== HISTÓRICO/LOGS ===== */
.busca-input {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.busca-input input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-1);
    font-size: 14px;
}
.busca-input input::placeholder { color: var(--text-3); }

.lista-vazia {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-2);
}
.lista-vazia .icon-grande {
    width: 50px; height: 50px;
    background: var(--bg-3);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--text-3);
}
.lista-vazia p { font-size: 14px; }
.lista-vazia .sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.total-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.total-card .icon-sq {
    width: 36px; height: 36px;
    background: var(--bg-2);
    border: 1px solid rgba(249,115,22,.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
}
.total-card .label { flex: 1; font-size: 13px; color: var(--text-2); }
.total-card .valor { color: var(--orange); font-size: 22px; font-weight: 800; }

/* ===== RECARGA / CRÉDITOS ===== */
.valor-grande-wrap {
    background: var(--bg-3);
    border: 2px solid var(--orange);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.valor-grande-wrap .moeda {
    color: var(--orange);
    font-size: 22px;
    font-weight: 800;
}
.valor-grande-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-1);
    font-size: 32px;
    font-weight: 700;
    text-align: center;
}
.botoes-rapidos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.botoes-rapidos button {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-1);
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .15s;
}
.botoes-rapidos button:hover { border-color: var(--orange); }

/* Pacotes de crédito */
.pacote-cred {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: .15s;
}
.pacote-cred:hover { border-color: var(--orange); }
.pacote-cred .num {
    width: 44px; height: 44px;
    background: var(--bg-2);
    border: 1px solid rgba(249,115,22,.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    font-size: 16px;
    font-weight: 800;
}
.pacote-cred .info { flex: 1; }
.pacote-cred .info strong { display: block; font-size: 14px; }
.pacote-cred .info .sub { font-size: 11px; color: var(--text-2); }
.pacote-cred .preco {
    text-align: right;
    color: var(--orange);
    font-size: 18px;
    font-weight: 800;
}
.pacote-cred .preco .moeda { font-size: 11px; color: var(--text-2); display: block; }

/* TOS */
.tos-item {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.tos-item .icon-sq {
    width: 36px; height: 36px;
    flex-shrink: 0;
}
.tos-item.aviso {
    background: rgba(249,115,22,.08);
    border-color: rgba(249,115,22,.3);
    color: #fed7aa;
    text-align: center;
    justify-content: center;
    padding: 14px;
    font-size: 12px;
}
.tos-item .verde { color: var(--green); font-weight: 700; }
.tos-item .laranja { color: var(--orange); font-weight: 700; }
.tos-item .amarelo { color: var(--yellow); font-weight: 700; }

.tos-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tos-link {
    text-align: center;
    color: var(--orange);
    font-size: 12px;
    margin: 12px 0;
    cursor: pointer;
}
.tos-rodape {
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
    margin-top: 12px;
}

/* Spinner */
.spinner-mini {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-1);
    z-index: 500;
    animation: slideRight .25s;
    box-shadow: var(--shadow);
}
.toast.sucesso { border-color: var(--green); }
.toast.erro    { border-color: var(--red); }
@keyframes slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
