/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
    background: #0f172a; /* azul escuro premium */
    color: #e5e7eb;
    min-height: 100vh;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* TOPO */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #020617;
    padding: 15px 25px;
    border-radius: 14px;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
}

.brand i {
    color: #38bdf8;
}

/* AÇÕES TOPO */
.top-actions {
    display: flex;
    gap: 15px;
}

.icon-btn {
    width: 42px;
    height: 42px;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5f5;
    text-decoration: none;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: #1e293b;
    transform: translateY(-2px);
}

.icon-btn.danger {
    color: #f87171;
    border-color: #7f1d1d;
}

/* BOAS VINDAS */
.welcome {
    margin-bottom: 30px;
    font-size: 18px;
    color: #cbd5f5;
}

/* CARD */
.painel-card {
    background: linear-gradient(180deg, #020617, #020617dd);
    border-radius: 20px;
    padding: 30px 25px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #1e293b;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.painel-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(56,189,248,0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.painel-card:hover::before {
    opacity: 1;
}

.painel-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.45);
}

/* ÍCONE */
.painel-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: #020617;
    border: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

/* TÍTULO */
.painel-card h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

/* DESCRIÇÃO */
.painel-card p {
    font-size: 14px;
    line-height: 1.5;
    color: #94a3b8;
}

/* VARIAÇÕES */
.painel-card.trader .painel-icon {
    color: #22c55e;
}

.painel-card.bet .painel-icon {
    color: #facc15;
}

.painel-card.relatorio .painel-icon {
    color: #38bdf8;
}

.painel-card.admin .painel-icon {
    color: #a78bfa;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .welcome {
        font-size: 16px;
    }

    .painel-card {
        padding: 25px 20px;
    }

    .painel-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

}

/* BOTÃO VOLTAR FLUTUANTE */
.btn-back {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 56px;
    height: 56px;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5f5;
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.45);
    transition: all 0.3s ease;
    z-index: 1000;
}

.btn-back:hover {
    background: #1e293b;
    transform: translateY(-4px);
    color: #38bdf8;
}

.module-badge {
    margin-left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.module-badge.bet {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border: 1px solid #facc15;
}

.module-badge.trader {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid #22c55e;
}

/* MENU USUÁRIO */
.user-menu {
    position: relative;
}

.user-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #020617;
    border: 1px solid #1e293b;
    color: #cbd5f5;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background: #1e293b;
}

/* DROPDOWN */
.user-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 12px;
    width: 190px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown a {
    padding: 12px 15px;
    color: #cbd5f5;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: background 0.25s ease;
}

.user-dropdown a:hover {
    background: #1e293b;
}

.user-dropdown a.danger {
    color: #f87171;
}

/* FORM CARD */
.form-card {
    max-width: 420px;
    margin: 40px auto;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.5);
}

/* HEADER */
.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 16px;
    background: #020617;
    border: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #facc15;
}

.form-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.form-header p {
    font-size: 14px;
    color: #94a3b8;
}

/* CAMPOS */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #cbd5f5;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #1e293b;
    background: #020617;
    color: #e5e7eb;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #facc15;
}

/* BOTÃO */
.btn-primary {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #020617;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(250,204,21,0.35);
}

.status.ativa {
    background: #2ecc71;
    color: #fff;
}

.status.encerrada {
    background: #e74c3c;
    color: #fff;
}

.empty-msg {
    color: #777;
    text-align: center;
    grid-column: 1 / -1;
}



/* GRID DE PAINÉIS */
.painel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    cursor: pointer;
    margin-top: 30px;
}

/* CARD BET */
.bet-card {
    background: linear-gradient(180deg, #020617, #020617dd);
    border-radius: 20px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    border: 1px solid #1e293b;
    transition: all 0.35s ease;
    overflow: hidden;
}

.bet-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,.45);
}

/* HEADER */
.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bet-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* STATUS */
.status {
    font-size: .75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.status.ativa {
    background: rgba(0, 200, 150, 0.15);
    color: #00c896;
}

.status.encerrada {
    background: rgba(255, 90, 90, 0.15);
    color: #ff5a5a;
}

/* VALORES */
.bet-balance {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.bet-balance div {
    background: #181818;
    border-radius: 10px;
    padding: 10px;
    width: 100%;
}

.bet-balance small {
    display: block;
    font-size: .75rem;
    color: #9aa0a6;
}

.bet-balance strong {
    font-size: 1rem;
    color: #fff;
}

/* RESULTADO */
.bet-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bet-result .profit {
    font-weight: 700;
    font-size: 1rem;
}

.bet-card.positive .profit {
    color: #00c896;
}

.bet-card.negative .profit {
    color: #ff5a5a;
}

/* Texto do lucro */
.profit-positive {
    color: #00c896 !important;
    font-weight: 600;
}

.profit-negative {
    color: #ff5a5a !important;
    font-weight: 600;
}

.profit-positive::before {
    content: '▲ ';
}

.profit-negative::before {
    content: '▼ ';
}

.meta-ok {
    color: #00c896 !important;
    font-weight: 600;
}

.meta-fail {
    color: #ff5a5a !important;
    font-weight: 600;
}


.bet-result .roi {
    font-size: .85rem;
    color: #9aa0a6;
}

/* FOOTER */
.bet-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.bet-footer .date {
    font-size: .75rem;
    color: #9aa0a6;
}

/* BOTÃO DETALHES */
.btn-details {
    font-size: .8rem;
    color: #00c896;
    text-decoration: none;
    font-weight: 600;
    transition: opacity .2s;
}

.btn-details:hover {
    opacity: .75;
}

/* MENSAGEM VAZIA */
.empty-msg {
    text-align: center;
    color: #9aa0a6;
    margin-top: 40px;
}

/* TOAST */
.toast {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn .5s ease forwards, fadeOut .5s ease forwards 3.5s;
    box-shadow: 0 20px 40px rgba(0,0,0,.45);
}

.toast i {
    font-size: 20px;
}

/* SUCESSO */
.toast.success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ecfdf5;
}

/* ERRO */
.toast.error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}

/* WARNING */
.toast.warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1f2933; /* texto escuro, melhor leitura */
}

/* ANIMAÇÕES */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(60px);
    }
}


.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
}

.bet-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bet-actions {
    display: flex;
    gap: 10px;
}

.icon-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020617;
    border: 1px solid #1e293b;
    color: #94a3b8;
    transition: all .25s ease;
    cursor: pointer;
}

.icon-action:hover {
    transform: translateY(-2px);
}

.icon-action.edit:hover {
    color: #38bdf8;
    border-color: #38bdf8;
}

.icon-action.delete:hover {
    color: #ef4444;
    border-color: #ef4444;
}

.bet-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #020617;
    border: 1px dashed #1e293b;
    border-radius: 12px;
    padding: 10px 14px;
}

.bet-meta small {
    color: #94a3b8;
    font-size: 12px;
}

.bet-meta strong {
    font-size: 14px;
    color: #facc15;
}

/* MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 999;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* MODAL BOX */
.modal-box {
    background: linear-gradient(180deg, #020617, #020617dd);
    border: 1px solid #1e293b;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: modalUp .35s ease;
}

@keyframes modalUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-box h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.modal-box p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
}

/* ICON */
.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}

.modal-icon.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ACTIONS */
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.btn-cancel {
    flex: 1;
    background: transparent;
    border: 1px solid #1e293b;
    color: #94a3b8;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all .25s ease;
}

.btn-cancel:hover {
    background: #020617;
}

.btn-danger {
    flex: 1;
    background: #ef4444;
    color: #fff;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all .25s ease;
}

.btn-danger:hover {
    background: #dc2626;
}


.empty-msg {
    text-align: center;
    color: #94a3b8;
    font-size: 15px;
}

.empty-link {
    margin-left: 6px;
    color: #38bdf8;
    font-weight: 600;
    text-decoration: none;
    transition: color .25s ease;
}

.empty-link:hover {
    color: #0ea5e9;
    text-decoration: underline;
}

.bet-actions {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 20px;
}

.btn-add-entry {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #020617;
    border: none;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 6px;

    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-add-entry i {
    font-size: 12px;
}

.btn-add-entry:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(34,197,94,.25);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-box h4 {
    margin-bottom: 20px;
    font-size: 20px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

/* Item */
.entry-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 14px 16px;
    transition: background .2s ease, transform .2s ease;
}

.entry-item:hover {
    background: rgba(255,255,255,0.04);
    transform: translateY(-1px);
}

/* Info */
.entry-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.entry-label {
    font-size: 11px;
    color: #bdc6d3;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.entry-info strong {
    font-size: 15px;
    color: #bdc6d3;
}

.entry-info small {
    font-size: 12px;
    color: #bdc6d3;
}

/* Status */
.entry-item.green {
    border-left: 4px solid #22c55e;
}

.entry-item.red {
    border-left: 4px solid #ef4444;
}

.entry-item.pendente {
    border-left: 4px solid #facc15;
}

.module-badge.pendente {
    color: #facc15;
    border: 1px solid #facc15;
}

.module-badge.green {
    color: #22c55e;
    border: 1px solid #22c55e;
}

.module-badge.red {
    color: #ef4444;
    border: 1px solid #ef4444;
}
/* Ações */
.entry-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
}

.btn-entry {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    border-radius: 8px;
    transition: background .2s ease, transform .2s ease;
}

.btn-entry.edit {
    color: #f8bb38;
}

.btn-entry.delete {
    color: #ef4444;
}

.btn-entry:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

/* Layout geral (exemplo) */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Esse card ocupa 2 colunas em telas grandes */
.bet-card-large {
    grid-column: span 1;
}

.entries-list {
    max-height: 420px; /* altura aproximada para ~10 itens */
    overflow-y: auto;
    padding-right: 4px;
}

.entries-list::-webkit-scrollbar {
    width: 6px;
}

.entries-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 8px;
    background: linear-gradient(180deg, #020617, #020617dd);
    color: #525252;
    outline: none;
    appearance: none; /* remove seta padrão */
    cursor: pointer;
}

/* ===== LOADER ===== */
#app-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f172a, #020617);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.6s ease forwards;
    animation-delay: 1.8s;
  }
  
  .loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #e5e7eb;
  }
  
  .loader-content i {
    font-size: 48px;
    color: #22c55e;
  }
  
  .loader-content span {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
  }
  
  /* Spinner premium */
  .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top: 3px solid #22c55e;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
  }
  
  /* animações */
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  @keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
  }
  
/* ===== TABELA MODERNA PREMIUM ===== */
.tabela-usuarios {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Inter', sans-serif;
    background: #ffffffcc; /* leve translucidez */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* CABEÇALHO */
.tabela-usuarios thead {
    background: linear-gradient(90deg, #0f172a, #1e293b);
}

.tabela-usuarios th {
    color: #f9fafb;
    font-weight: 600;
    text-align: left;
    padding: 16px 24px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* LINHAS */
.tabela-usuarios tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.tabela-usuarios tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.45);
}

/* CÉLULAS */
.tabela-usuarios td {
    padding: 16px 24px;
    font-size: 14px;
    color: #f1f5f9;
    background: linear-gradient(180deg, #020617, #020617dd);
}



/* STATUS */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.status.pago {
    background: #d1fae5;
    color: #047857;
}

.status.nao-pago {
    background: #fee2e2;
    color: #b91c1c;
}

/* SWITCH */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #d1d5db;
    transition: 0.4s;
    border-radius: 50px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10b981;
}

input:checked + .slider:before {
    transform: translateX(24px);
}
/* Caso esteja checado mas desabilitado */
input:checked:disabled + .slider {
    background-color: #aaa; /* cinza mais escuro para diferenciar */
}


input:checked + .slider:before {
    transform: translateX(26px);
}
input:disabled + .slider {
    background-color: #ccc;
    cursor: not-allowed;
}
/* RESPONSIVO */
@media (max-width: 768px) {
    .tabela-usuarios th, .tabela-usuarios td {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Item */
.status-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 14px 16px;
    transition: background .2s ease, transform .2s ease;
}

.status-user:hover {
    background: rgba(255,255,255,0.04);
    transform: translateY(-1px);
}

/* Status */
.status-user.pago {
    border-left: 4px solid #22c55e;
}

.status-user.nao-pago {
    border-left: 4px solid #ef4444;
}
