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

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background: #f5f7fa; 
    color: #0a2540; 
    line-height: 1.6; 
}

/* ==========================================
   TELA DE LOGIN ADMIN
   ========================================== */
.auth-screen { 
    min-height: 100vh; 
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 20px; 
}

.auth-container { 
    background: white; 
    border-radius: 20px; 
    padding: 32px; 
    width: 100%; 
    max-width: 440px; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); 
}

.auth-header { text-align: center; margin-bottom: 28px; }

.logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }

.logo-icon.admin-logo { 
    width: 56px; 
    height: 56px; 
    background: linear-gradient(135deg, #f44336, #d32f2f); 
    color: white; 
    border-radius: 16px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 900; 
    font-size: 28px; 
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.auth-header h1 { font-size: 26px; font-weight: 800; color: #0a2540; }
.auth-header p { color: #6b7c93; font-size: 14px; }

.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #0a2540; }
.input-group input { 
    width: 100%; 
    padding: 12px 14px; 
    border: 1.5px solid #e3e8ee; 
    border-radius: 10px; 
    font-size: 14px; 
    transition: all 0.2s; 
}
.input-group input:focus { 
    outline: none; 
    border-color: #f44336; 
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.15); 
}

.btn-primary { 
    width: 100%; 
    padding: 14px; 
    border: none; 
    border-radius: 10px; 
    font-size: 15px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.2s; 
}

.btn-primary.btn-red { 
    background: linear-gradient(135deg, #f44336, #d32f2f); 
    color: white; 
}
.btn-primary.btn-red:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4); 
}

.btn-primary.btn-small {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
}

/* ==========================================
   DASHBOARD ADMIN
   ========================================== */
.dashboard-screen { display: flex; min-height: 100vh; background: #f5f7fa; }

.topbar.admin-topbar { 
    position: fixed; 
    top: 0; left: 0; right: 0; 
    height: 60px; 
    background: #0a2540; 
    color: white; 
    display: flex; 
    align-items: center; 
    padding: 0 20px; 
    z-index: 100; 
    gap: 16px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.menu-btn { 
    width: 40px; height: 40px; border: none; 
    background: rgba(255,255,255,0.1); color: white;
    border-radius: 10px; font-size: 20px; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; 
}

.topbar-title { font-size: 18px; font-weight: 700; flex: 1; }

.sidebar.admin-sidebar { 
    position: fixed; top: 0; left: -280px; width: 260px; height: 100vh; 
    background: #1e293b; color: white; z-index: 200; 
    transition: left 0.3s ease; padding: 20px 0; 
}
.sidebar.admin-sidebar.open { left: 0; }

.sidebar-overlay { 
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
    background: rgba(0,0,0,0.5); z-index: 150; display: none; 
}
.sidebar-overlay.show { display: block; }

.sidebar-header { 
    display: flex; align-items: center; gap: 12px; 
    padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; 
}
.sidebar-header .logo-icon.admin-logo { width: 44px; height: 44px; font-size: 22px; }
.sidebar-header h2 { font-size: 20px; font-weight: 700; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
.nav-link { 
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; 
    color: rgba(255,255,255,0.75); text-decoration: none; border-radius: 10px; 
    font-size: 14px; transition: all 0.2s; 
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-link.active { background: linear-gradient(135deg, #f44336, #d32f2f); color: white; font-weight: 600; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.main-content { flex: 1; margin-top: 60px; padding: 24px 20px; max-width: 1200px; width: 100%; }

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 24px; font-weight: 700; color: #0a2540; margin-bottom: 4px; }
.page-header p { color: #6b7c93; font-size: 14px; }

.card { 
    background: white; border-radius: 16px; padding: 24px; 
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.08); border: 1px solid #e3e8ee; margin-bottom: 20px; 
}

.list-container { display: flex; flex-direction: column; gap: 12px; }

/* ==========================================
   CORREÇÃO FINAL: LISTA DE USUÁRIOS
   ========================================== */
.list-item { 
    display: flex; 
    flex-direction: column;
    gap: 14px; 
    padding: 20px; 
    background: #f8f9fa; 
    border-radius: 12px; 
    border-left: 4px solid #00d4aa;
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.list-item-name {
    font-size: 18px;
    font-weight: 700;
    color: #0a2540;
}

.list-item-balance {
    font-size: 14px;
    font-weight: 600;
    color: #00c853;
    background: #f0fffc;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.list-item-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.list-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7c93;
    flex-wrap: nowrap;
}

.list-item-row .icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.list-item-row .text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.list-item-row .phone {
    white-space: nowrap;
    flex-shrink: 0;
}

.list-item-divider {
    color: #cbd5e1;
    font-weight: 300;
    margin: 0 4px;
}

.list-item-id {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0e7ff;
    color: #4f46e5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.list-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    padding-top: 12px;
    border-top: 1px dashed #e3e8ee;
}

.list-item-referral {
    font-size: 12px;
    color: #6b7c93;
    flex: 1;
}

.list-item-referral code {
    background: #f5f7fa;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #0a2540;
}

.empty-state { text-align: center; padding: 40px; color: #6b7c93; font-size: 14px; }

.badge-info { 
    font-size: 11px; background: #f5f7fa; padding: 4px 10px; 
    border-radius: 20px; color: #6b7c93; font-weight: 600;
}

/* BOTÕES DE AÇÃO DO ADMIN */
.btn-approve {
    background: #00c853; color: white; border: none; padding: 10px 20px;
    border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 13px; transition: all 0.2s; flex: 1;
}
.btn-approve:hover { background: #00a344; transform: translateY(-1px); }

.btn-reject {
    background: #f44336; color: white; border: none; padding: 10px 20px;
    border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 13px; transition: all 0.2s; flex: 1;
}
.btn-reject:hover { background: #d32f2f; transform: translateY(-1px); }

/* ==========================================
   RESPONSIVO
   ========================================== */
@media (min-width: 768px) {
    .sidebar.admin-sidebar { left: 0; }
    .menu-btn { display: none; }
    .main-content { margin-left: 260px; padding: 32px; }
    
    .list-item {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    
    .list-item-header {
        flex-direction: column;
        align-items: flex-start;
        flex: 1;
        gap: 8px;
    }
    
    .list-item-content {
        flex: 2;
    }
    
    .list-item-footer {
        flex: 1;
        justify-content: flex-end;
        border-top: none;
        padding-top: 0;
    }
}

@media (max-width: 767px) {
    .topbar-title { font-size: 16px; }
    .page-header h2 { font-size: 20px; }
    
    .list-item {
        padding: 16px;
    }
    
    .list-item-name {
        font-size: 16px;
    }
    
    .list-item-row {
        font-size: 12px;
        flex-wrap: wrap;
    }
    
    .list-item-row .phone {
        white-space: normal;
        flex-shrink: 1;
    }
}