/* ========================================
   TEMA MINIMALISTA - DARK COM AZUL SUAVE
   ======================================== */

:root {
    /* Cores principais */
    --bg-dark: #0f1419 !important;
    --bg-card: #1a1f2e !important;
    --bg-card-hover: #222838 !important;
    --bg-input: #151a24 !important;
    
    /* Azul suave */
    --blue-primary: #4a9eff !important;
    --blue-light: #6eb4ff !important;
    --blue-dark: #3d84d4 !important;
    --blue-subtle: rgba(74, 158, 255, 0.1) !important;
    
    /* Textos */
    --text-primary: #e4e6eb !important;
    --text-secondary: #8b92a8 !important;
    --text-muted: #5a6177 !important;
    
    /* Bordas */
    --border-default: #2a3143 !important;
    --border-focus: #4a9eff !important;
    
    /* Estados */
    --success: #4ade80 !important;
    --warning: #fbbf24 !important;
    --error: #ef4444 !important;
    --info: #60a5fa !important;
}

/* ========================================
   RESET E ESTRUTURA BASE
   ======================================== */

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

body {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%) !important;
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif !important;
    line-height: 1.6 !important;
    min-height: 100vh;
}

/* ========================================
   CARDS E CONTAINERS
   ======================================== */

.card, .profile-card, .balance-card, .section-card, .transaction-card, 
.event-card, .plan-card, .login-card, .register-card, .faq-item,
.wallet-card, .team-card, .record-item {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.card:hover, .plan-card:hover, .event-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
}

/* ========================================
   BOTÕES
   ======================================== */

.btn, .login-button, .pix-button, .action-btn, .submit-btn,
button[type="submit"], .primary-btn {
    background: var(--blue-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn:hover, .login-button:hover, .pix-button:hover, .action-btn:hover,
button[type="submit"]:hover {
    background: var(--blue-light);
    transform: translateY(-1px);
}

.btn:active, button[type="submit"]:active {
    transform: translateY(0);
}

.btn-secondary, .cancel-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-focus);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--blue-primary);
    color: var(--blue-primary);
}

.btn-outline:hover {
    background: var(--blue-subtle);
}

/* Botões de ação (comprar, checkin, etc) */
.buy-btn, .checkin-btn, .invest-btn {
    background: var(--blue-primary);
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

.buy-btn:disabled, .checkin-btn:disabled {
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* ========================================
   INPUTS E FORMULÁRIOS
   ======================================== */

.input-wrapper, .input-group {
    margin-bottom: 16px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--border-focus);
    background: var(--bg-card);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* ========================================
   TEXTOS E TÍTULOS
   ======================================== */

h1, h2, h3, h4, h5, h6,
.page-title, .section-title, .card-header h2, .logo-text {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }

p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

a {
    color: var(--blue-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--blue-light);
}

/* ========================================
   Header action buttons (notificação/FAQ) — centraliza ícones dentro da caixa
   ======================================== */

.header-actions .action-btn,
.header-actions a.action-btn,
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.action-btn img {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.action-btn i {
    display: block;
    line-height: 1;
}

/* ========================================
   ALERTAS E NOTIFICAÇÕES
   ======================================== */

.alert, .message, .notification {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid;
}

.alert-success, .success-message {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-error, .error-message {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.alert-warning, .warning-message {
    background: rgba(251, 191, 36, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-info, .info-message {
    background: rgba(96, 165, 250, 0.1);
    border-color: var(--info);
    color: var(--info);
}

/* ========================================
   NAVEGAÇÃO E TABS
   ======================================== */

.tabbar, .tab-bar, .bottom-nav {
    background: var(--bg-card);
    border-top: 1px solid var(--border-default);
}

.tab-item {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.tab-item:hover,
.tab-item.tab-active,
.tab-item.active {
    color: var(--blue-primary);
}

.tab-icon-container svg,
.tab-icon svg {
    fill: var(--text-muted);
    transition: fill 0.2s ease;
}

.tab-item.tab-active .tab-icon-container svg,
.tab-item.active .tab-icon svg {
    fill: var(--blue-primary);
}

/* ========================================
   BADGES E LABELS
   ======================================== */

.badge, .status-badge, .level-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.badge-success {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.badge-info {
    background: rgba(96, 165, 250, 0.15);
    color: var(--info);
}

/* ========================================
   VALORES E SALDOS
   ======================================== */

.balance-amount, .amount, .value, .price {
    color: var(--blue-light);
    font-size: 24px;
    font-weight: 600;
}

.currency {
    color: var(--text-secondary);
    font-size: 16px;
    margin-left: 4px;
}

/* ========================================
   MENU LATERAL
   ======================================== */

.menu, .sidebar-menu {
    background: var(--bg-card);
    border-right: 1px solid var(--border-default);
}

.menu-item {
    color: var(--text-secondary);
    padding: 12px 16px;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px 8px;
}

.menu-item:hover,
.menu-item.active {
    background: var(--blue-subtle);
    color: var(--blue-primary);
}

.menu-item img,
.menu-item i {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.menu-item:hover img,
.menu-item:hover i,
.menu-item.active img,
.menu-item.active i {
    opacity: 1;
}

/* ========================================
   SCROLLBAR CUSTOMIZADA
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue-dark);
}

/* ========================================
   TABELAS
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--bg-input);
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border-default);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border-default);
}

tr:hover {
    background: var(--bg-card-hover);
}

/* ========================================
   UTILITÁRIOS
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media (max-width: 768px) {
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    
    .card, .profile-card, .balance-card {
        padding: 16px;
    }
    
    .btn, .login-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ========================================
   ANIMAÇÕES SUAVES
   ======================================== */

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ========================================
   LOADING E SPINNERS
   ======================================== */
/*
  IMPORTANTE: não estilizar a classe genérica `.loading`.
  Várias telas colocam `loading` no BOTÃO para desabilitar/classe de estado.
  Se estilarmos `.loading` como spinner, o botão vira um círculo girando.
*/

.spinner-minimal {
    border: 3px solid var(--border-default);
    border-top-color: var(--blue-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spinMinimal 0.8s linear infinite;
}

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

/* ========================================
   AJUSTES ESPECÍFICOS PARA ELEMENTOS EXISTENTES
   ======================================== */

/* Remove sombras/glows excessivos */
.card, .btn, .input-wrapper, .profile-card,
.balance-card, .event-card, .plan-card {
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Login/Register (muitas telas têm CSS inline "neon") */
.login-card, .register-card, .login-button,
.logo-text, .page-title, .section-title,
.card-header h2 {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

/* Fundo animado (canvas) — deixa minimalista e puxa pro azul */
#networkCanvas {
    opacity: 0.12 !important;
    filter: hue-rotate(90deg) saturate(45%) !important;
}

/* Botões principais — remove gradiente neon */
.login-button,
.pix-button,
.action-btn,
.btn,
button[type="submit"] {
    background: var(--blue-primary) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.login-button:hover,
.pix-button:hover,
.action-btn:hover,
.btn:hover,
button[type="submit"]:hover {
    background: var(--blue-light) !important;
    box-shadow: none !important;
}

/* Simplifica bordas */
.card, .profile-card, .balance-card {
    border: 1px solid var(--border-default) !important;
}

/* Ajusta hover states */
.card:hover, .plan-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* ========================================
   MENU LATERAL (compatível com o menu antigo do projeto)
   - Usa as classes: .menu-toggle, .menu-bar, .side-menu, .menu-overlay, .menu-item
   - Sem !important, para páginas que já têm CSS inline continuarem dominando
   ======================================== */

.menu-toggle {
    position: fixed;
    left: 20px;
    top: 20px;
    width: 56px;
    height: 56px;
    background: rgba(26, 31, 46, 0.85);
    border: 1px solid rgba(74, 158, 255, 0.35);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 2500;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.menu-bar {
    width: 28px;
    height: 3px;
    background: var(--blue-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active .menu-bar:nth-child(1) { 
    transform: rotate(45deg) translate(8px, 8px); 
}
.menu-toggle.active .menu-bar:nth-child(2) { 
    opacity: 0; 
    transform: scale(0);
}
.menu-toggle.active .menu-bar:nth-child(3) { 
    transform: rotate(-45deg) translate(8px, -8px); 
}

.side-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(26, 31, 46, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.35);
    z-index: 2450;
    transition: left 0.35s ease;
    padding-top: 100px;
    border-right: 1px solid rgba(74, 158, 255, 0.25);
    overflow-y: auto;
}

.side-menu.open { 
    left: 0; 
}

.menu-header {
    padding: 0 24px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
}

.menu-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.side-menu .menu-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    margin: 4px 0;
    position: relative;
    overflow: hidden;
}

.side-menu .menu-item:hover {
    color: var(--text-primary);
    border-left-color: rgba(74, 158, 255, 0.8);
    background: rgba(74, 158, 255, 0.08);
}

.side-menu .menu-item img {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    opacity: 0.9;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.side-menu .menu-item:hover img {
    transform: scale(1.06);
    opacity: 1;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2440;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.menu-overlay.open { 
    opacity: 1; 
    visibility: visible; 
}

@media (max-width: 480px) {
    .menu-toggle { left: 12px; top: 12px; width: 52px; height: 52px; }
    .side-menu { width: 82vw; max-width: 320px; }
}

/* ========================================
   COMPATIBILIDADE: VARIÁVEIS LEGADAS (tema antigo "cyan")
   Muitas páginas usam --cyan-bright/--primary-dark no CSS inline.
   Mapeamos tudo para o novo tema minimalista.
   ======================================== */

:root {
    --primary-dark: var(--bg-dark) !important;
    --secondary-dark: #141a24 !important;
    --dark-teal: #121826 !important;

    /* Antigo "cyan" vira azul suave */
    --cyan-bright: var(--blue-primary) !important;
    --cyan-glow: var(--blue-light) !important;
    --cyan-dark: var(--blue-dark) !important;

    /* Antigos textos/bordas */
    --border-cyan: var(--border-default) !important;
    --text-cyan: var(--text-primary) !important;
    --text-light: var(--text-secondary) !important;
    --text-white: var(--text-primary) !important;

    /* Antigos fundos */
    --input-bg: var(--bg-input) !important;
    --card-bg: var(--bg-card) !important;
}

